XOJO on the M2G Desktop

With the release of the My2ndGeneration Desktop version 1.3.0.0 the myBackSpace.com XOJO architecture now runs on the Desktop as well as the My2ndGeneration Cloud. Also, Views are now supported in addition to tables when creation your myBackSpace architecture for XOJO.

There is a Video showing all this in action on the myBackSpace.com site.

Check it out and enjoy …


Posted in My2ndGeneration Desktop, myBackSpace, XOJO

Desktop 1.3.0.0 Released

The My2ndGeneration Desktop version 1.3.0.0 can now be fully integrated with Microsoft Visual Studio. You can even embed templates into Visual Studio. My2ndGeneration is the future of code generation within Visual Studio.

Enhance the Visual Studio Experience

If you plan on using the Templates embedded in Visual Studio you can enhance the experience by mapping the ”.M2G” extension in Visual Studio to “JavaScript Editor” in VS2013 or “Script Editor” in earlier version of Visual Studio. This is done under Tool –> Options –> Text Editor –> File Extension like so:

VsExension

In VS 2013 this provides nice syntax highlight and validation. You can even run JSLint against your .M2G file it if you hand edit the project file inside. Don’t use the period “.” when adding the extension in the dialog above. You will probably have to close / reopen Visual Studio after mapping the .M2G extension.

XOJO Support

After installing the Desktop version 1.3.0.0 all of the XOJO mappings will be present allowing you develop and execute XOJO templates on the Desktop. See www.myBackSpace.com for more information and an excellent video on the process.

Posted in My2ndGeneration Desktop, Visual Studio Integration

Feel the Power

Power

Whoa !! I just embedded my first My2ndGeneration Template into Microsoft Visual Studio. Some guy wrote this killer template and published it for anyone to use. So, I pulled it down from the My2ndGeneration Cloud and now my project is going to come in on time and under budget.

I think I’ll knock off at 4:30 today and go home and play some Call of Duty and relax. Oh, and that two week-in-a-row vacation request? Not a problem, my boss didn’t even flinch.

I didn’t have the heart to tell Jim, (who was still working on his 900 line T4 template) when I left tonight that he was wasting his time. I’ll tell him in the morning. Now our entire team can write and maintain templates and via drag and drop even.

The story you’ve read above is true. We haven’t seen our project lead now in weeks. Last we saw of him he was mumbling something about catching an Iron Maiden concert somewhere in Europe. But no matter, the project is in great shape.

See how he did it here …

video


Posted in My2ndGeneration Desktop, Visual Studio Integration, Windows

XOJO, myBackSpace, and M2G

xojoThis blog post embodies the very reason why we created My2ndGeneration, and that is “Collaboration”.

One of our My2ndGeneration users, “Daniel Pigford”, has created a very powerful template that fills a real need. Daniel’s template will reverse engineer your SQLite database into XOJO classes which can read and write to the SQLite database in a very high level. It’s fantastic, fast, free, and very easy to use.  If you are a XOJO user this is the way you want to work with your data and you can generated it in seconds.

We here at My2ndGeneration feel a certain connection to XOJO because it is the same product that we use to create our multi-platform “Metadata Upload Client” for the My2ndGeneration cloud. The XOJO site states over 250,000 users world wide, that’s some audience.

We worked closely behind the scenes to support Daniel including adding the XOJO to SQLite database mappings. We also wrote our very own XOJO syntax highlighter mode for our template editor. We will be adding the database mappings for rest of our supported databases for XOJO as well.

We encourage your to check out the myBackSpace.com website, There are step by step instructions for the entire process which is quite simple. From the screen shots is looks as though Daniel is working on the Mac, very cool.

From www.myBackSpace.com

Generate XOJO/SQLite source code for your XOJO project following these steps.

  1. Create a FREE My2ndGeneration account.  Show me.
  2. Database schema upload to My2ndGeneration Cloud.  Show me.
  3. Transform database schema to XOJO source code.  Show me.
  4. Download XOJO source code, add to XOJO.  Show me.
  5. When the database schema changes; repeat the process.

Fun, fast, easy development.

There is even a cool Video showing how it’s done as well …

 


Posted in My2ndGeneration Cloud, myBackSpace, XOJO

Cloud Upgrades

We’ve taken a few detours on our way to full Visual Studio integration in the My2ndGeneration Desktop version, but they were all well worth it, here’s what we’ve done.

1) We upgraded to the latest CodeMirror.NET editor.
2) We upgraded to the latest Wijmo control suite.
3) We upgraded to the latest version of Knockout.

The site is very solid, however, you might have to force refresh you browser cache as often times they don’t properly upgrade when JavaScript files change.

There are quite a few new editor styles that you can choose in your account settings.

We’ve also been working closely with one of our users adding support for XOJO adding both a syntax parser for XOJO syntax and database mappings from SQLite to XOJO types. More on this later.

Alight then, its back to the Desktop version …

Posted in My2ndGeneration Cloud

Visual Studio Integration Update

Things are moving along quite nicely. Something our users will greatly appreciate is that in the process of developing our full Visual Studio support we have created what are essentially project files (recalls the settings of each template you execute automatically). An embedded My2ndGeneration Visual Studio template doesn’t contain the actual template, rather it contains all of the information required to execute a particular template

Let’s take a look at how this all works:

Enabling Support for Visual Studio

There is a new menu option that will allow you to enable Visual Studio support for VS2010, VS2012, VS2013 and all future versions.

B1

Once you click on the VS Support icon (shown above in the red circle) you will be presented with the dialog above. You can pick and choose which instances of Visual Studio you want to add (or remove) My2ndGeneration support to.

Once Inside Visual Studio

After you have enabled My2ndGeneration support for Visual Studio you can launch the My2ndGeneration Desktop as a Visual Studio AddIn via the Visual Studio “Tools” menu (shown below).

B2

My2ndGeneration can run as a stand alone desktop application or as a Visual Studio AddIn. If you enable Visual Studio support you can still run the My2ndGeneration Desktop as a stand alone application. Shown below is My2ndGeneration running inside of Visual Studio 2013.

B3

Of course this is all pretty cool. If you’re using My2ndGeneration within Visual Studio you don’t have to switch applications, but we’re just getting started.

My2ndGeneration Visual Studio Templates

When you want to add a My2ndGeneration embedded template to your project you use the same approach as adding a new file. You right mouse on your project, choose “Add” then “New Item” and you will see “My2ndGeneration Template” as an option.

B4

This will create a new file with the .M2G extension to your solution with the “Custom Tool” already hooked up for you (shown below). We can see this by looking at the properties of our “Tempate1.M2G” file.

B5

Notice that Visual Studio sees our Template1.M2G as a JavaScript or JSON file, you can tell this by looking at the icon for the Template1.M2G file in the project file above. This is by design and was configured this way when we enabled support for Visual Studio as shown in the first image at the top of this blog post.

Where it All Pays Off

What is in this Template1.M2G file? Everything that is needed to execute a given template. This data is in JSON format (as shown in image below). There are two awesome benefits here.

  • We have the ability to record these settings when you run any template. Then all you need to do is copy the recorded output into your Tempate1.M2G file and it will execute the template as desired.
  • Because we record the results of every template execution we can automatically pre-select your last settings for you whenever you execute a template using the cloud or desktop versions. This will save you a ton of time when you need to regenerate your artifacts, whatever they may be.

B6

Finally, the Code Generation Itself.

Anytime you edit and save a .M2G file the template will be executed. This means you can open a template, add a new table to the “Tables” list, hit save, and it’s automatically regenerated. Of course, at any time you can execute it by using your right mouse to invoke the “Run Custom Tool” option. See the image below showing the results of executing the above template.

B7

Notice that the My2ndGeneration AddIn generated the Employees and Orders classes just as we have directed it to in our Template1.M2G template.This all gets checked into your source control system and your entire development team now benefits.

When will it be released?

This is a significant release that will require a lot of testing. Anytime you start writing complex visual studio extensions testing become paramount. Also, we have enhanced the metadata to include information about the template itself in order to be able to generate these many project files. Thus, we need to retro-fit these changes back into the My2ndGeneration cloud version as we always keep the desktop and cloud version in-sync so that templates always execute correctly whether they be in the cloud or on the desktop.

If you’re interested in a beta version of this release email us at support@my2ndgeneration.com and let us know. We are looking at a March 23rd release date for the beta (possibly sooner) and we expect the final release to follow on shortly as we will have done a lot of internal testing before the beta release.

M2GLOGO

Posted in My2ndGeneration Desktop, Visual Studio Integration

M2G’s Revolutionary Approach

The next release of the My2ndGeneration Desktop about is about to change the concept of Templating within Visual Studio forever. And from here, the sky’s the limit. We are talking to some of the online IDE developers about building this technology into their browser based IDE’s which is a perfect fit with our cloud based generator.

So, What is this Revolution?

Take a look at the snap shot below and you will notice several key components:

  • In the left panel is the My2ndGeneration Desktop running inside Visual Studio.
  • In the Solution notice the Tiraggo.M2G file. This file has a “Custom Tool” associated with it called “My2ndGenerationGenerator” that produces the output by executing the desired template. This is akin to a T4 template only rather than containing the template it describes the template it wants to execute with the desired input.
  • The Tiraggo.M2G contents are also shown in the top right panel. All “.M2G” files use Javascript formatting as does any typical JavaScript file. There is even a template that can generate your M2G file for you!

M2G_VS_Integration

Why is the My2ndGeneration Approach Superior to T4?

The My2ndGeneration Desktop is already runs within Visual Studio. However that in itself is not the revolutionary part although it is nice to be able run the My2ndGeneration Desktop inside Visual Studio or as a stand alone executable.

No, the revolutionary part is going to be the displacement of T4 as the templating engine of choice, and I’m not sure T4 was really anyone’s preferred choice.

  • T4 Templates are extremely hard to write, understand, and maintain.
  • T4 Templates require on average 20 to 100 times more code than a M2G template.
  • T4 Templates look nothing like the output they are trying to create.
  • T4 Templates are dangerous in that a T4 template has full access to your machine.
  • T4 Templates are not actually templates but C# programs masquerading as templates.
The My2ndGeneration Advantage

My2ndGeneration templates look much more like the actual output than they do templates and they are based on Handlbars.js which is the most popular templating engine.My2ndGeneration allows for full JavaScript execution on the Desktop and since Handlebars.js is “logicless” is cannot reach out and touch your machine in any way whatsoever. There is no chance of a My2ndGeneration template ever harming your computer. My2ndGeneration provides full low level database schema information to EDMX based templates whereas T4 hides this information from the developer. My2ndGeneration can use your database schema, user provided JSON, and even EDMX files as it source of input. We will also soon be allowing as input to templates direct queries against NoSQL databases like MongoDB which are JSON based.

Finally, there is a My2ndGeneration cloud based version where templates are published and shared among the My2ndGeneration community. With your free My2ndGeneration account you work in repositories and can collaborate with other developers and even grant them collaborator access to your repositories. There is even a tiny metadata client that runs on Windows, Linux, and the Mac that will push your metadata up to the cloud. My2ndGeneration is in no way Windows only technology.

What does a typical M2G Template look like?

A typical My2ndGeneration template looks like the sample below. This one happens to create a simple POCO. The “Items” collection that we are looping over contains a list of tables and the associated metadata for all of the associated database objects like columns, foreign keys, primary keys and so on ..

Compare the simplicity of this My2ndGeneration template to one of your T4 Templates.

M2G_Typical

The template above produces the output below for every table selected.
Each in it’s separate file.

public class Employees
{
    public int? EmployeeID { get; set; }
    public string LastName { get; set; }
    public string FirstName { get; set; }
    public DateTime? BirthDate { get; set; }
    public DateTime? HireDate { get; set; }
    public byte[] Photo { get; set; }
    public int? ReportsTo { get; set; }
    // and so on …
}

The best part about the My2ndGeneration Desktop is that you can create templates via drag drop. Any templates that executes in the cloud will also execute on the Desktop.

Sign up for for Free Account and get started today …


M2G_image

Posted in My2ndGeneration Client, My2ndGeneration Desktop, Templates, Visual Studio Integration
Twitter

Enter your email address to follow this blog and receive notifications of new posts by email.

Follow

Get every new post delivered to your Inbox.