Smart Mobile Studio
  • News
  • Forums
  • Download
  • Store
  • Showcases
    • Featured demos
    • The Smart Contest 2013, Round 1 – Graphics
  • Documentation
    • Get the book
    • System requirements
    • Prerequisites
    • Getting started
      • Introduction
      • Application architecture
      • The application object
      • Forms and navigation
      • Message dialogs
      • Themes and styles
    • Project types
      • Visual project
      • Game project
      • Console project
    • Layout manager
    • Networking
      • TW3HttpRequest
      • TW3JSONP
      • Loading files
  • About

Tag Archives: Upcoming features

SPNG: Be informed when values change

Posted on 08.04.2017 by Jon Lennart Posted in Developers log, News, News and articles 2 Comments

There are many new and powerful features in the upcoming release of Smart Mobile Studio (also refered to as Smart Pascal, Next Generation: SPNG in short): One of the most powerful is the ability to be notified when a value or object changes with a single line of code.

So far TVariant has just been a helper class for dealing with typical tasks. Well, perhaps not just typical because under Smart Pascal, variants can map directly to a javascript object (of any type) and allows you direct access to its prototype. The Handle property that all visual controls have is an example of this. The type TControlHandle is actually a reference to the visual element inside the DOM (document object mode). So by accessing that directly in your code, you can change styles, attributes and properties of that element. You are not bounds to only use our pre-fabricated solutions.

In the next update TVariant have a lot of new members. Two that stands out as important: watch() and unwatch().

As their name imply they will warch something for you. In this case you wil be notified whenever a single property, a whole object or indeed – a property deep within an object is altered. It may sound trivial but it’s actually one of those features that lays the foundation for responsive, data-aware controls.

But you can use it for many other things as well. For example you can now attach an event directly to a string. And whenever that string changes (either by your code, the user, or some other script) you can act on it directly. That is pretty cool and very helpful!

  // create an empty javascript object
  var MyValue: Variant := TVariant.CreateObject();

  // Set a default value
  MyValue.NewProperty := 12; // add a property and set a value

  // We want to know when the object changes
  TVariant.Watch(MyValue, "NewProperty", procedure ()
    begin
      showmessage("You changed the value!");
    end);

In this snippet we setup a javascript object and place a named-property inside that object. We then listen for changes to that property (by name even). So if you change that value further down in the code, or by calling some procedure elsewhere – the event will fire and show the message dialog.

This is of-cource just a tiny fragment of the new code that has been added, not to mention the changes and fixes. Some of these features are presently in alpha stage and is being tested. We will post more and more news in the days and weeks ahead – and we are sure you will be pleased with some the fantastic new things you can now code!

Here is an example of the new desktop and windowing applications you can write (picture below): The smart desktop!

The Smart desktop

We decided to update the uartex Media Desktop, an example initially made for touch based embedded environments – and turned it into a fully functional desktop environment!

Both the desktop itself, the filesystem, the IO drivers and windowing toolkit is written in Smart Pascal. You can create kiosk software designed to run on embedded devices, advanced applications designed to run on your intranet – or full cloud systems. So it can run a Smart application inside each Window if you like. But you have full control over windows, file access, directly listings, menu items and can sculpt both the desktop and applications to suit your needs.

The desktop can be coupled with a node.js backend that handles multi-user login and file access. It gives your users access to designated home-folders (again under your control). So each user can have their own work files just like a thin client, and each user can run different applications from a fully working desktop environment.

Below you are seeing Quake II compiled from C/C++ to LLVM bitcode. This is in turn compiled to JavaScript via asm.js. This means the browser will compile the javascript into machine code after loading. So Quake II runs at native speed, all JavaScript, inside our desktop window.

Create windowed applications with Smart Desktop

Create windowed applications with Smart Desktop

You will also be happy to head that x86 Linux and ARM kiosk distros have been created. So once happy with your desktop you can in fact boot straight into it in fullscreen. No Linux desktop or shell — just your desktop running. Both Firefox and Chrome can be used as presenter.

Have a great easter!

announcement code demo HTML5 javascript Object Pascal OP4JS release Smart Mobile Studio Upcoming features

New Package Manager

Posted on 22.12.2013 by Smart Mobile Studio Team Posted in Developers log

PackageWith version 2.0 we have spent some precious development time into a new package manager. Similar to other solutions it allows to separate components into packages  that can be independently installed in the IDE. Although there is no imminent need for it right now, it opens the IDE for 3rd party and user components that can be integrated into the RAD environment easily.

Steema BergWhile there is still some work ahead to iron out some teething problems in the upcoming beta version, it is already used in combination with the new visual designer and its basic set of components, called the “Smart Component Library” (SCL). In addition to the basic set of components, two additional 3rd party packages are shipped with the product TeeChart.spk (by Steema Software) and Grid.spk (by Berg Software). The packages are built to integrate neat-less into the IDE’s component palette.

Furthermore we added an example package called W3Slider.spk with embedded source code. It is designed according to the all-in-one-file approach, that can also be used for the project. With packages designed like this, installation can be as easy as dropping the spk file to the ‘Packages’ folder. In the future we will also add support for encrypted package source code, so that it is possible to build closed source packages.

Implementation Details

While the amount of changes (compared to Version 1.x) in this regards seem to be very little, it meant infact to rewrite the entire chain of handling components (in the component palette, visual designer & property inspector) from scratch. Previously all components were “hard coded” in Delphi, which means for every new component we added, we needed to update the component palette, add a dedicated Delphi component for the visual designer & property inspector, convert from Delphi to DWS at compile time and handle property storage in form file. All this code was convoluted in several manners and one couldn’t change one part without affecting other parts in the IDE.

Since we wanted to rewrite the visual designer, we had to rewrite the entire package system as well. Despite the fact that the development of version 2.0 took longer than expected, we now have a system that is perfectly decoupled in the aspects of package manager, visual designer, component palette, property inspector and form handling. It will allow us to maintain and improve each aspect separately. Also it will be possible for us in the future to switch to a JavaScript powered designer, which might allow you to create your layout on the destination device (e.g. iPhone) directly. This allows you to let a designer or even the management redesign the GUI remotely while you can focus on the code…

XMLBut let’s stick on what we have now, let’s stay on topic! The packages are basically in a similar XML format as your projects, which means you can – in case of emergencies – edit (and eventually fix) the packages at any time. This can be quite useful, since at the moment the GUI part of the package manager is limited to the essentials. For example it’s not possible at the moment to specify different categories for different components in one package. So far you may only specify one category per package, while the packages would allow an even more detailed specification of categories (per component). Also it’s not yet possible to change/specify icons for a component other than by editing the package files.

But of course you don’t need to know all the details if you only want to work with the packages, so let’s move on to the next chapter.

Package installation / usage

PackagesThe installation of packages is very easy. All you need to do is to drop the package to the ‘Packages’ subdirectory.

Note that it might also be necessary to add glyphs for the component palette to the glyphs directory, but that depends whether the icons are specified internally or externally. At the moment a basic set of (external) glyphs is shipped with the product. We decided to make them available externally, so you can change them anytime to your favorite set of icons (the current icons are not always as clear as possible).

Once you have added/removed a package to the package subdirectory you have to restart the IDE in order to get the packages enumerated and listed in the component palette. If you have deleted a package, it will remain in the IDE’s cache until you restart the IDE.

After the packages have been installed, you can use the components in the same manner as you used the components in version 1.x.

Continue reading→

Upcoming features

Global rename function

Posted on 17.02.2012 by Jon Lennart Posted in Developers log, News and articles 6 Comments
Global rename done

Global rename done

Being able to rename a unit via the project treeview is commonplace in mid to high range editors today. There are a lot of javascript editors out there, some more evolved than others – but the number of object pascal editors is sadly very limited. You have Delphi of-course which is great (and the most advanced object pascal editor on the marked), then there is Lazarus which is the free and open version written in freepascal – and while there are other alternatives, none of them even comes close to the original “Delphi” look and feel.

Believe it or not but this time Smart Mobile Studio actually got something Delphi doesn’t (Delphi 7 was our initial model): global renaming. When you rename a unit under Smart, it doesn’t just alter the source-code for the unit in question – it alters all references to that unit in the entire project. No need to backtrack and update the uses declaration elsewhere, they are all changed in a single sweep.

We can actually map the use of a class or method throughout a whole project, and it’s super quick as well!

Database mapped RTL

But we have more tricks up our sleeve. I took the time to make a recursive database indexer for our RTL files. So the first time you run Smart it will parse and extract every inch of information about the RTL and store it in a database table. This table is kept in memory and used to speedup extraction of data regarding classes, methods and properties.

It also has the benefit of giving me instant access to things like class ancestors, data types, fields, scope, interfaces and all those tiresome look-up chores that makes a mess of a codebase. So armed with a TClientDataset map (what did you expect? No self respecting Delphi app is complete without at least one instance of TClientDataset) of the RTL, it is now super easy to beef up and compliment the compiler. On top of my head here are a few things i’m gunning for:

  • Complete class at cursor
  • Rename class at cursor
  • Add interface to class
  • Merge classes
  • Support for documentation remarks above methods
  • Mouse-over information about symbols

I doubt we will be able to stuff all the goodies into version 1 of Smart Mobile Studio, but rest assured that I will do my best to get as much features into Smart as I can.

Globals

And now that the indexing and background compile is up to speed, the time has come to finish the globals feature. Globals allows you to edit a list of object (of any class) that should be created automatically by TApplication. Very handy if you have a database connection or some game logic you want to be created on startup.

These are exciting days!

Smart Mobile Studio Upcoming features

Gearing up for final alpha

Posted on 15.02.2012 by Smart Mobile Studio Team Posted in Developers log

As we approach the final alpha release of Smart Mobile Studio and entering the beta stage, the IDE is really starting to feel more and more like Delphi. It truly is the attention to little things that makes an IDE work in real life – and Smart Mobile Studio is no different. So what can you expect to find in the upcoming versions?

Automated editing

No place like home, the Smart IDE in action

No place like home, the Smart IDE in action (blue skin optional)

Basic IDE functionality includes the ability for the environment to alter your source-code. To poll this off the IDE must know things like where does the “unit” keyword appear in a source-file? It must also tell the difference between the interface and implementation section of a unit and other important things like where in your code a class is defined.

We are happy to say that this functionality is now under wraps. So when you rename a unit from the project tree view, the source-code is altered accordingly. But of-course this type of functionality has a lot more going for it – because it forms the foundation on which the layout designer rests. The designer must by its nature have access to the source-code and it must also be able to add, alter and remove sections of a unit.

And we are going to alter the “form designer” formula slightly, with less mess and less data in the final compiled application. You will just have to wait and see how cool it is.

Better browsing

The browser window has also seen a radical change. We used to limit the view to iPhone only but have now removed the iPhone background and opted for several sizes. So now you can check how your app will look on your iPad, your webkit browser (any size) and various other standard measurements.

Components and packages

In version 1 there will be no support for individual source packages, but we have designed a system that will make it very simple to get your own components into the design-cycle. The IDE will have a normal ini file where you can register components. To install a new component or a series of components, just add a new section to the ini-file, register each component (syntax pending) and copy the unit(s) to the library folder. Then go to the Tools menu and click “Rebuild RTL index”.

Faster class browser

The previous class browser parsed and scanned each unit on startup which caused a noticeable delay. The new class browser will extract it’s information from the RTL index which is basically a database table covering ever aspect of the registered RTL units and libraries. The final outcome will be super-quick and allow for click-able links. So if you click on an ancestor class, it will instantly browse to that class. Very handy and more natural. You can also go directly to the RTL source-code and check out the implementation.

 

Sincerely

The Smart Mobile Team

Upcoming features

Export features: zip and ftp

Posted on 12.02.2012 by Jon Lennart Posted in Developers log
Export to FTP

Export to FTP

While not in the original specs I decided we must have FTP publishing support in Smart Mobile Studio. In popular demand from people in the alpha group I also added zip support. This means that you can now export your project either locally or remotely, in either normal file format (backup) or as a compiled project.

This adds to the already built-in functionality to save your entire project as a single file (all external files can be included in the project file).

What is exported?

If you go for the “backup” export then Smart takes you entire project folder, source and resources, and copies it to the target. If you opt for a zip export then all the files are stored into a normal zip archive (native Delphi zip support of-course, no external libraries needed) and saved to the target location.

If you have selected FTP as your mode of export then the zip archive will be shipped off that way.

This will make it a lot easier to maintain X number of mobile applications from your developer machine no matter where you host the files.

It will be a fairly ad-hoc approach in v1.0 but we will add more to the foundation in later versions of Smart Mobile Studio. In the future you will be able to script and automate the IDE to do magical things 🙂

Upcoming features

TApplication coming to a close

Posted on 28.10.2011 by Jon Lennart Posted in Developers log
Always when you least need it

Always when you least need it

Yes, I know. This month was meant to be a very active time for OP4JS but sadly Norwegian weather brings with it complications like colds and the flu. So in short i have spent nearly 3 weeks off the grid with nothing but fevers, allergies and sneezing. So to those of you eagerly awaiting the Alpha release of OP4JS I am sad to inform you that we might have to push the date forward to make up for lost time.

Be that as it may my health is finally picking up after the onslaught of germs, viruses and weather up here – so for the past week I have been eagerly working on the object model, in this case: TApplication.

Much like under Objective C (which is the official language you use to create iOS applications, although you can now use alternatives) TApplication is the root controller object. It is in charge of creating a visible screen, kick-starting your application code, which in turn creates forms and register them, which is ultimately injected into the viewport. The viewport (or visible area) being a child object of TScreen – the place where forms do their thing.

Why go to so much trouble you ask? Well, it has to do with several aspects of HTML5 but first and foremost it deals with clipping and scrolling. You want your forms to slide in without problems under any webkit based browser (be it Safari Mobile or Chrome for Android). Secondly, we are trying to avoid having different TApplication models for each of our project types. We are currently aiming for 3 project types:

  • Graphical application (“form” based”)
  • Console application (for test purposes)
  • Game application
The nested layout made visible

The nested layout made visible

TApplication have to be dynamic enough to suit all 3 variations – and we also want to safeguard ourselves for the future where more project types come into play (libraries being on top of the list).

It also have to manage the forms you add to your application correctly, which means taking care of transitions, pre-positioning forms prior to movement and many more details. But thankfully we found a solution that is simple, elegant and robust. And no external dependency either. We might even drop jQuery soon because quite frankly: we dont need it.

On your right is view of how we organize things. The white color is from the actual HTML5 document, the red color is TScreen – which in turn has a child TCustomControl called viewport (green).

The benefits of this layout is that you can (if you want to) add a global header directly to the TScreen object. So instead of each form descending from TW3HeaderForm (which as the TW3Header control built into it) you can just create one header for the whole app. Of-course this means that your forms have to change the title and deal with the back and next buttons directly – but that’s just as easy as it would be in ordinary Delphi.

The second benefit is more or less the same, except for the footer. Many native apps have main view controller that introduces a fixed header and footer, typically containing a tab-bar at the bottom and a toolbar on top. We want to support this because it solves a lot of problems (and also makes you apps faster. The less objects the faster it runs, that’s how it works in Delphi as well).

Well — I better get back to work!

Upcoming features

Pages

  • About
  • Feature Matrix
  • Forums
  • News
  • Release History
  • Download
  • Showcases
    • The Smart Contest 2013, Round 1 – Graphics
  • Store
  • Documentation
    • Creating your own controls
    • Debugging, exceptions and error handling
    • Differences between Delphi and Smart
    • Get the book
    • Getting started
      • Introduction
      • Local storage, session storage and global storage
      • Application architecture
      • The application object
      • Forms and navigation
      • Message dialogs
      • pmSmart Box Model
      • Themes and styles
    • Layout manager
    • Networking
      • Loading files
      • TW3HttpRequest
      • TW3JSONP
    • Prerequisites
    • Real data, talking to sqLite
    • System requirements
    • Project types
      • Visual project
      • Game project
      • Console project

Archives

  • December 2019
  • December 2018
  • November 2018
  • July 2018
  • June 2018
  • February 2018
  • September 2017
  • April 2017
  • November 2016
  • October 2016
  • September 2016
  • April 2016
  • March 2016
  • January 2016
  • October 2015
  • September 2015
  • July 2015
  • April 2015
  • January 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • November 2011
  • October 2011
  • September 2011

Categories

  • Announcements (25)
  • Developers log (119)
  • Documentation (26)
  • News (104)
  • News and articles (16)

WordPress

  • Register
  • Log in
  • WordPress

Subscribe

  • Entries (RSS)
  • Comments (RSS)
© Optimale Systemer AS