LANSA

Wow, its been a while since I have posted something. There have been quite a lot of changes in my life since 2013. I have two daughters and had a job change where I left MTM Recognition after 11 years and went somewhere else for a few months before coming to my current job. 

At my current job, I have left the .NET and Java world and entered the world of LANSA, though I still visit on occasion :D.

I first got exposed to LANSA at MTM Recognition as we were looking to modernize our system on an IBM i Series. We had run the gamut of options from re-writing everything in .NET and moving to Windows, to keeping the iSeries and re-writing everything in Java, to 3rd party solutions that promised to take all the RPG and convert it to Java for us.

Nothing really seemed feasible or cost effective.

A co-worker mentioned LANSA and frankly I did not give it much thought at the time. They advertise themselves as a 4GL tool and I have experienced those before and really did not want anything to do with it. My co-worker scheduled a demo of the their software Visual LANSA that is supposed to all you to rapidly build web applications. I grudgingly agreed, mainly to appease my friend.

I went into that demo pretty much prepared to hate it.

I came out of it pretty much floored. If what I had just seen really was possible, then this could radically change how web applications are built. 

Now that is a pretty crazy statement, but let me explain.

State of Web Development Today

Think about what the state of web development today is. We have moved away from the "dumb browser" model where we avoided JavaScript like the plague and all html was generated on the server. Now we are pushing more and more logic into the browser.

We have moved away from stateless web sites and moved to stateful web applications. New JavaScript frameworks like Backbone, Angular and Ember helped drive these new applications.

But these frameworks have a cost as the complexity to build and deploy these applications have increased tremendously. Now web front ends have an entire build and deployment process that use to only be in the realm of server side systems. This caused many teams to develop front end specialist developers working along side their server side counterparts. With NodeJS, the technology barrier was reduced as the same language was used on the client and the server, but advanced knowledge of the respective frameworks was still required.

So where does LANSA fit in?

* NOTE: While the Visual LANSA is the name of the product the company LANSA creates, I tend to refer to Visual LANSA as just LANSA.

One of the biggest draws to LANSA is that they have a custom "language", more like a DSL that does EVERYTHING. I mean everything. There is no having to know JavaScript, CSS, Html and your server side language of choice. You have one language to know. The compiler that handles that language is responsible for generating the Html, JavaScript, CSS and server side C code (or RPG if you are on an iSeries). So great, your thinking its a code generator.

Not Just A Code Generator

People hear code generator and it seems they instantly shut down. Yes, LANSA generates code. But so does C# and Java, do you consider them code generators?

When you compile C#, you are not compiling to machine code the compiler is generating MSIL. That code is then just in time compiled (JIT'ed) to machine code that can be executed. 

LANSA operates the same way. You as the developer write the code. When you compile it, it either generates the JavaScript, CSS and Html for web client objects. The server side code gets generated as "C" then invokes standard C compilers to turn it into actual machine code.

The other way LANSA is not a code generator is that you never, never, ever touch the generated code. How often do you have to go fiddle with the MSIL for your C# object? I imagine not very often. When you debug your C# code, do you debug the MSIL? Probably not. LANSA is the same way.

LANSA has a debugger that allows you to step through and inspect variables. I will have to say however, that this is one thing that I am not a big fan of. It works, but it needs help. More on this later.

Framework Fatigue

It seems like a new framework pops up every week, especially in the JavaScript world. Trying to keep up with them all is damn near if not completely impossible. Think about the frameworks you use on the server. Do you use IoC containers, ORM's what different design patterns do you employ? Besides learning the technology, you have to typically have to have a robust knowledge of all the supporting components in your system including containers, patterns, orms etc.

With LANSA, most of these things go away. It handles all of that plumbing for you. I say most, because some useful patterns emerge once you get going with it.

Architecture

What about the architecture employed by a LANSA web application. Again comparing it to how I think a modern web developer would architect their application. Consider on the client you have a framework like Angular or Ember creating web components that maintaining state and presentation. Those components communicate with the server via a WebAPI like constructs such as controllers. The controllers then communicate to the database via an ORM, data access object or repository depending on your data access implementation. Granted this is a bit of an oversimplification, but you get the point.

 LANSA has reusable parts (web components) that maintain state and presentation. Those components communicate to the server via server modules (controllers) over HTTP. Those server modules communicate to the database via object access modules (OAM) just like an ORM, data access object or repository.

So fundamentally the application architecture is almost exactly like what a modern web developer would build.

Summary

As you may tell, I am pretty into this software.  I am now employed at a company where I use it almost exclusively and have been able to push applications into production in a fraction of the time it take me with other tools. Of course its not all rainbows and unicorns. No tool is perfect. However the more time I spend with it the more I come to think it truly could become a "game changer" in the world of web application development.

I plan to write more on LANSA and share more of my experiences. I really just want to get the word out about LANSA and share some tips and insights as I get them along the way.

Thanks for reading,
Joe 

Comments

You can follow this conversation by subscribing to the comment feed for this post.

The comments to this entry are closed.