Home > Object Pascal > Smart Mobile Studio Workshop

Smart Mobile Studio Workshop

I was recently presented with the notion of holding a Smart Mobile Studio workshop. Essentially offer my services to companies who want to get up to date with cloud and mobile development using Smart Mobile Studio.

Want to learn the secrets of Smart Mobile Studio? This is your ticket

Want to learn the secrets of Smart Mobile Studio? This is your ticket

Initially this idea seemed alien to me; I don’t have a problem speaking to a crowd or anything, but I must admit that I have little experience holding workshops. Luckily this notion coincides with my book writing, meaning that I have already started to structure a curriculum for learning Smart Pascal; moving from basic dialectic advantages to writing full speed database driven async cloud services.

I have concluded that my book will actually be a series of smaller books, each dealing in-depth with the topic. There is simply to many facets in Smart Pascal to cover it all in a single chapter. Things like cloud-service programming contains so much potential and so many intricate topics that it deserves to be a small book on its own.

But when it comes to the workshop, the idea has grown on me. Because another aspect of this great idea is to demonstrate just how much object pascal can offer a business (!). Smart Pascal is not just about mobile phones, it’s evolved to be much more – just as JavaScript has evolved to be much more as well.

Below I have written down some of the segments I intend to use in my workshop. It will be a tight schedule, starting at 09:00 and finishing off at around 16:30 (with 30 minutes lunch break at 11:30-12:00). At the end of the workshop tasks for each segment is handed out, you can pick the one you find most interesting. I have dedicated 2 hours for individual work. Each member is expected to bring a laptop with at least Windows XP installed. A copy of Smart Mobile Studio Enterprise is given to each attendant.

Creating your business around object pascal

In modern computing the choices are often bound to the limitations of your language. For instance PHP users tend to stick with Apache (but php runs fine on IIS, just saying), Java programmers use Tomcat or similar, JavaScript programmers use nodeJS or a derived version of this– and ASP.net users tend to go with IIS even thought it runs fine on Apache with mono.

But what about object pascal programmers? What are our options to match the performance, the elegance and the integration that other languages enjoy?

In this part of the workshop I will introduce you to DWScript HTTP server, which is a phenomenal piece of software designed specifically for object pascal based businesses. When it comes to speed and efficiency it’s right up there with the best of them, but it contains probably more exciting features than all of the aforementioned languages combined.

  • Full support for Object Pascal server-side
  • Full support for Object Pascal client side (using Smart Mobile Studio compiler)
  • Built-in support for all major databases
  • Easy authentication mechanism
  • Support for HTTPS through SSL library files (.dll’s)
  • CORS management
  • Plenty of internal functionality accessible through scripting

The result is a web infrastructure unlike any other, a modern http solution way beyond nodeJS in pure performance– giving you the power of “Ruby on Rails” with the simplicity of PHP in one kick-ass little package. So for businesses which have their own, physical server in-house, running DWScript HTTP server will be like a breath of fresh air.

In this section I will go through how you can write your back-end software for Smart Mobile Studio projects using the DWScript HTTP Server; We will also look at how object pascal makes HTML templates fun to make, how you can make use of the server even from native Delphi applications, it’s REST capabilities and more.

Cloud computing

Getting the big picture can be hard, especially with so much hype being sold on the concept of cloud. This is where I can help your team cut through the ocean of useless information and focus on solutions. Smart Mobile Studio introduces support for nodeJS programming, which is a cornerstone cloud technology. It is platform independent, hardware independent and extremely resource efficient.

Where DWScript HTTP server above represents a native object pascal server which requires a virtual-server host to run, nodeJS means that you can make use of inexpensive hosting solutions. NodeJS is the same on both Windows and Linux, which is also what the cloud is all about: hardware abstraction.

Smart Mobile Studio ships with a nodeJS project type. This project is fairly low-level, exposing the core node server API directly. To leverage this and make it more user-friendly (and feature rich), I have built a very powerful service layer on top of this low-level stack. This means you can now write high-speed, fully scalable services, much like a win32 service or a Linux daemon, that lives and runs completely in the cloud.

I will teach you how to design your services to be scalable, movable and CPU efficient. Scaling is extremely important, especially for businesses that conform to seasons. Businesses like sports-ticket services is a good example. During the high-season their processing requirements can shoot from 40000 to 1000000 over night.

Well with Smart Services that’s not a problem. Just clone X number of instances horizontally of the service and setup a round-robin dispatcher as the entry-point. Scaling your service to go from 100 tickets to handling payloads of 1000000 tickets is no longer a matter throwing more iron on the problem; these days you just select the number of clones you want and click apply.

Writing mobile applications

This is an area which Smart Mobile Studio excels, and in fact it was written to be an alternative to native solutions (mono, delphi, xcode and more). I can teach your team how to write code that behaves identical on all platforms (Android, iOS, Blackberry and Microsoft), and last but not least I will teach you how to tap into the hidden sides of Phonegap, like how to control bluetooth, pre-allocating your database, protecting your files and much, much more.

Focus of this segment is on application architecture, the Smart display organization, how best to initialize your database for data storage on the device – and last but not least, caching, memory and streams.

Note: Smart Mobile Studio recently introduced support for streams, raw memory allocation and intrinsic datatype conversion. This is unheard of in other solutions. Not even typescript have ventured that far into the secrets of JavaScript. I will guide you through the differences (for those coming from a Delphi or FPC background) in how memory is handled.

If you want to write JavaScript which runs lightning fast, which behaves like native code and which does stuff most JavaScript programmers only dream of — then this segment is for you.

Writing custom controls

Writing your own controls should be a fun and pleasant experience. Focus should be on what you want to achieve, not how you can force the RTL to behave in a predictable manner. If you have ever written advanced user-controls for ASP.net then you know exactly how little fun this can be.

I can guide you through the RTL step by step, explain the methods you need to override and why. I will go through the inheritance layers from TW3TagObject which creates an HTML element — all the way up to TW3CustomControl which represents a complete, blank user-control with supports for everything.

Working with JavaScript and TypeScript

With the basic understanding of what Smart Mobile Studio does and how the RTL interacts with the document object model, getting to grips with third-party libraries is suddenly fun.

In this final part of the work-shop we go through the basics, from writing raw JavaScript in ASM sections, to writing shadow classes to match externally defined JavaScript.

We will also have a look at typescript and I will teach you how to import typescript controls and convert them to Smart Pascal units. This way you get access to thousands of Typescript user-controls and libraries — all of them usable in your Smart Projects.

Hosting the workshop

If you want to bring your team up to speed with the above topics you can register to host my workshop. I require a 50% deposit prior to leaving Norway, to cover flight and housing accommodations. The rest is expected to be payed on the same day as the event takes place.

Once there I will travel to your company or selected location and hold the workshop. The workshop should be set to start at around 09:00 and end at 17:00. It is a full day workshop with two hours dedicated for programming where I am 100% available for questions, help and guidance. The rest of the day is a thorough and in-depth look at Smart Mobile Studio, the RTL, how applications work – followed by practical segments on each technology: using DWScript HTTP to host Smart applications, writing mobile applications, application architecture, Phonegap, working with databases and last but not least — nodeJS service programming).

  1. May 23, 2015 at 10:19 am

    Perhaps the most intriguing question right off the bat would be, how is that white chalk leaving an orange trail in the stock photo? 🙂

  2. June 3, 2015 at 5:41 am

    I use to do similar workshops to help companies start working with our little mORMot.
    It is IMHO mandatory to have a good introduction, and the ability to ask questions about any new technology.
    Even is SMS is RAD-oriented, its main benefit is indeed its SmartPascal language, and the JavaScript ecosystem – including node.js.
    So I hope people using Smart you would have the opportunity to let you introduce company developers to this new way of developing.
    BTW, I was also asked to do some “Webinar” sessions.
    Has any of you already made such sessions? Which tool to use?

    • Jon Lennart Aasenden
      June 3, 2015 at 10:28 pm

      I tried skyping you earlier. You are not an easy man to reach. I really want to make more use of mormot in SMS (and other tools). PM me on facebook, let’s create a monster 🙂

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: