Developer

Learning the basics of the OutSystems Agile Platform

In this six-part developer diary, Justin James chronicles using the OutSystems Agile Platform to write a real-world Web application. Part two focuses on how he got a handle on the Agile Platform.

 

When I first sat down with the OutSystems Agile Platform, I wanted to get my hands deep into it like I was used to doing with other products. Unfortunately, I was so used to other products (notably, Visual Studio) that I kept trying to impose their workflows and paradigms on top of the Agile Platform, and that does not work. In today's developer diary, I'll walk you through my experiences with getting a handle on the Agile Platform. If you are a newcomer to the Agile Platform, hopefully I will save you some time. If you are an experienced developer with the Agile Platform, you will quite possibly chuckle along and say, "me too!"

My first try at using the Agile Platform was a "Hello World" kind of application where you would have a place to type a name and a button, and when you clicked the button, it would concatenate "Hello" with the contents of the input control and put the results on the screen. In ASP.NET, I took the following steps to write this code:

  1. Create the screen by dragging the needed controls (a TextBox, a Label, and a Button) to the screen.
  2. Double click the Submit button to get Visual Studio to create a default handler for the OnClick event, and take me to it.
  3. Write code to get the value of the input control and prefix it with "Hello."
  4. Write code to set the label control's Text property value to the new string. See Figure A.

Figure A

Agile Platform tutorial

The Agile Platform includes embedded tutorials to aid developers in the learning process.

That's really not so bad, at least for something simple. Now, if I wanted something a bit more robust, I would have moved all of this logic to a separate function and called the function from the event handler. After all, there is often more than one way to trigger functionality in a Web application, so it is best not to tie the logic up inside an event handler.

When I tried this in Service Studio (the Agile Platform's modeling tool) though, it just was not going to happen. Things seemed the same up front: I was able to drag controls to the screen and double click the Submit button to access the Workflow Creation screen, but I could not find a way to set the text property of my label (what the Agile Platform calls an Expression). It wasn't until I sat down with Miguel Baltazar from OutSystems and he walked me through this that I really came to understand the pervasive data binding in the Agile Platform. In this case, I needed to not try to directly set the Expression's text value, but to tell it that it get its value from a local variable, and in my workflow to assign the input's value to that variable's value. And because of the nature of the Service Studio, there is really no need to split the functionality into a separate function (or Action as the Agile Platform calls it) in most cases. Over the course of working with the application that I am writing with the Agile Platform (the application is called Rat Catcher), I found only a few cases where splitting a piece of logic into a separate, globally available Action was necessary, and a handful of times I did it in an individual screen.

When this happened, there were not nearly as many training videos on the OutSystems Web site as there are now. This was before the release of the Community Edition, and I get the feeling that at the time, the typical customer would have their developers spend time with a trainer from OutSystems, and that the first project a customer would do was more like a joint project than a solo project. This is just my recollection of my impression at the time, so I may be mistaken. I do remember telling Miguel that there needed to be more training resources available for people like me, especially if they wanted to do the Community Edition. I was looking at the Agile Platform to do a review of it, so I had to proceed even if I found it frustrating, but the typical developer just experimenting on their lunch hour has a low threshold for pain. So when the Community Edition launched and came with a ton of video tutorials, I was really impressed.

I thought I knew it all (I got "Hello World" working, right?) so I barreled ahead into Rat Catcher. After a few hours, I did get a good handle on working with Service Studio, even without the video tutorials. But there were still a lot of gaps in my knowledge, especially with things like how to approach certain types of problems. I have a tough time with any kind of learning that involves sitting back and listening. (I once had to spend a week doing classroom training for a reporting product, and I thought I was going to lose my mind.) So when I got stuck, I would go to the training center, find a video that talked about the subject at hand, and watch it. The videos are all excellent -- I just have a hard time watching videos, and I really wanted to get started.

The Agile Platform is made up of four components: the Service Studio, the Service Center, the Integration Studio, and the Agile Network. The Service Studio, which is used to model the data and workflows, is where I spend most of my time. The Service Center resides on the server (or your development machine) and controls the deployed applications and components, and how the server is configured. The Integration Studio is used to connect your applications to externally written code. The Agile Network is run by OutSystems, and it is where you go for training and to manage your projects if you are a paying member of the network.

The Agile Platform has a lot of depth to it, and the further I get with Rat Catcher, the more I am seeing this. Without knowing the more advanced techniques like working with AJAX and using the Enterprise Manager component, the Agile Platform has still given me a huge leg up in my development. If I really wanted to, I could stay at a basic level of understanding and still have major productivity gains over using Visual Studio to churn out ASP.NET. The tight integration of the data binding and the entity system along with TrueChange are worth the price of admission by themselves. You'll see that too, the first time you have to make major structural changes to the data architecture, and the system saves you hours of manual rewriting and retesting.

At the same time, I want more. If the Agile Platform can make working with AJAX as easy as it makes handling data, why not take the time to learn it? The training videos (under 90 minutes for the videos on Rich Widgets) are a lot shorter than the amount of time it would take me to learn jQuery or the Microsoft AJAX Control Toolkit.

Rat Catcher is pretty different from the typical Web application; it is more like a portal to running batch jobs than anything else. At the level of basic functionality that I need to reach before it is in a marketable condition, things like AJAX are not yet needed and will not add much value. But I also have a roadmap of functionality. I am merging the Agile ideas of iterations, deployments, sprints, etc. with a more traditional, planned out model. I have a long list of things I want to do. In fact, I have a plan of the "good enough" level that I will launch with and the "much improved" level of functionality that certain features will end up having. A lot of those "much improved" levels of functionality (and additional features that I will add post-launch) are going to use the added depth of the Agile Platform. There are only so many hours in a day, but I have had to make sure that I set aside some time to really watch those training videos and learn this system to be able to take full advantage of its power.

Rat Catcher's functionality runs the gamut of what you expect to see in a Web application: user management, browsing through data and selecting individual items for updates, and so on. In addition, it will need to perform billing operations, and the bulk of its actual processing is performed in a batch processing manner, kicked off by the Agile Platform and integrating with externally developed code. As a result, it will use just about every facet of the Agile Platform in one way or another. In fact, the strength of the Integration Studio and the ability to write batch processes with the Timer component are major attractions to the Agile Platform for this project. Without these capabilities, I would need to share the database structure between two applications and have the batch processing be kicked off by a scheduled task within Windows; this kind of code separation is too often a nightmare to debug and to coordinate. Because I plan on using so much of the Agile Platform's functionality, I will really know it inside and out by the time this project is done.

One of my first tasks on the Rat Catcher project was to get the same functionality that I had in my WinForms prototype to work in the new site. That meant that I needed to use the Integration Studio to connect to my core algorithm code. In my next installment, I'll show you some of the paths that I used to work with externally developed code through the Integration Studio.

J.Ja

Disclosure of Justin's industry affiliations: Justin James has a contract with Spiceworks to write product buying guides; he has a contract with OpenAmplify, which is owned by Hapax, to write a series of blogs, tutorials, and articles; and he has a contract with OutSystems to write articles, sample code, etc.

---------------------------------------------------------------------------------------

Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

About

Justin James is the Lead Architect for Conigent.

0 comments

Editor's Picks