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

Beta1, components and layout

Posted on 18.03.2012 by Smart Mobile Studio Team Posted in News 11 Comments

It’s a been a while since we published anything about Smart Mobile Studio, but that doesn’t mean we have been resting on our laurels. Quite the opposite. We have been busy with the final step of the project – namely the visual designer. We know that people have been waiting for our first beta release – and you will not be disappointed! So while we are tinkering on the final bits, here is a status report of what we have been up to.

Resources and forms

Components galore

Components galore

On the surface, creating a form designer seems simple. You just have to put some boxes out and make them move around right? If only that was true. You have to keep in mind that while we are coding our product in Delphi – the code that it generates and the information the designer works with – all exist in a separate realm of JavaScript.

Since Javascript lacks a concept of resource management, storing your form-designs as JSon or XML data in the compiled javascript would be overkill. Yes, we could dump out the data into the compiled code and get away with it, but that would have an impact on the speed, and also introduce a lot of behind the scene’s “magic” for our unit scanner. We wanted the component fields to show up in the unit-map, just like it does in Delphi, and we want to have as few factors involved as possible.

The solution we came up with is both simple and elegant. Ordinary Delphi stores the form designs in a resource section which is referenced by a single {$R *.dfm} statement. This data requires the full might of the VCL framework in order to work. What we did was turn the entire thing on it’s head. So rather than having a framework which must support loading and parsing of binary or text data, class and component registration, persistence and object serialization — we simply thought: Why not generate setup-code rather than setup data?

So we introduced two include references to the form-source code, like this:

type
  TForm1 = class(TW3form)
  private
    {$I 'Form1:intf'}
  protected
    procedure InitializeObject; override;
    procedure FinalizeObject; override;
  end;

procedure TForm1.InitializeObject;
begin
  inherited;
  {$I 'Form1:impl'}
end;

These two lines trigger the pre-compiler to generate the source-code required to create, initialize and position your controls. So rather than storing your designs as data, which then goes through a process of loading, parsing and initialization – your Smart forms are 100% pure code! Initialized on the spot.

Standard components

Along with the work invested in the designer, the pre-compiler and general fixes we also had to give our component base a cleanup. In the previous releases focus was on the compiler and underlying RTL – but in Beta 1 the focus will be more on the components than anything else. So all components have been cleaned up, properties moved into published scope and missing bits and pieces have been added. We have also worked hard on introducing components that we consider standard, like TW3Memo, TW3Toolbar and TW3ComboBox.

Component palette is growing

Component palette is growing

Since Smart v1.0 was designed to target the mobile marked (with exclusive focus on Safari Mobile) there are some peculiarities that are iPhone/iPad specific. Under Safari Mobile there is no such thing as a listbox for instance. Here the combo-box serves as a list’s outer face – and when you tap on it the list appears as a native wheel selector at the bottom of the screen. The lists you see on the iPhone are actually menu-lists.

All in all, our standard base of visual controls (which can be dropped into your designs) include:

  • TW3Panel
  • TW3Button
  • TW3ToolButton
  • TW3ToolBarButton
  • TW3Toolbar
  • TW3Header
  • TW3Checkbox
  • TW3ComboBox
  • TW3Image
  • TW3Canvas
  • TW3MenuList

Application dialogs

Dialogs couldnt be simpler to use

Dialogs couldn’t be simpler to use

In the world of HTML there is no such thing as a modal requester. You can of course call the native browser functions (like alert) and display a messagebox – but the standard dialog that ships with the browser leaves a lot to be desired.

Since there are no modal mechanisms in HTML our own dialog functions (now a part of TW3CustomApplication) automatically creates a click-blocker that prevents controls and forms to be accessed while the dialog is showing. So finally you can show a dialog and demand that the user respond to it before proceeding.

While creating dialogs or indeed – any type of custom control is a snap in Smart Mobile Studio, we stuck with the paradigm of a few classic dialog types (basically one or two buttons):

  • aoYes
  • aoNo
  • aoYesNo
  • aoOK
  • aoCancel
  • aoOKCancel

This is not a revolutionary function, but since other javascript frameworks out there marked dialogs and click-blockers like it was rocket science, it is worth noting that JVL has full support for it. And unlike a couple of our competitors, our version doesn’t fall apart when you resize the display 🙂

More IDE functions in place

The largest piece of work that has been added to the mix deals with the IDE. Where we previously had to compile code before extracting information – the IDE now pre-compiles the entire RTL and extracts the information to a database. This means that lookup into symbols and syntax from the RTL is now super fast. Features like the class browser benefits greatly from this work and we will be using it to boost source-code hints and other features in the future.

Smart Mobile Studio is almost complete

Smart Mobile Studio is almost complete

Also, when you rename a unit – all references to that unit are renamed across the entire project (which means all source code references). The same function will soon apply to classes and other symbols as well. The full list of changes and additions is simply to large in scope to document here – but rest assured, we have not been resting on our laurels…

Sincerely

The Smart Mobile Team

« Smart hits the local news
Debugging smart apps on your mac »

11 thoughts on “Beta1, components and layout”

  1. michaelbunny says:
    18.03.2012 at 10:43

    Thank you!

  2. Fleager says:
    18.03.2012 at 11:33

    I’m looking forward to try this. You’ve already done such a great job. Keep coding!

  3. paul_nicholls says:
    20.03.2012 at 11:43

    Lookin’ just awesome guys! I can’t wait to test drive it 🙂

  4. Nils.Haeck says:
    21.03.2012 at 12:31

    +1 for the good job 🙂

    I am getting more and more enthusiastic about this project and I hope I can dive into Smart Mobile Studio soon. Hopefully a good, *smart* solution for the cross-platform mess, instead of EMBT Delphi’s half-baked design.

    • Jon Lennart Aasenden says:
      21.03.2012 at 12:37

      Thanks! First version is for webkit, but i am working on the universal api in my head already 🙂

      • Nils.Haeck says:
        21.03.2012 at 12:43

        I do have an iPad now so if webkit can be used for the iPad I am very eager to give it a go.. what are the prerequisites, do I need a special Apple account?

        • Jon Lennart Aasenden says:
          21.03.2012 at 13:52

          Nope. Just fire it up and visit the URL in safari on your ipad. Put the URL as a shortcut on the ipad front-screen – and the app runs in fullscreen. If you want to make a real exe of the project, submit it to phonegap (you need an apple account for that part)

  5. yeyo says:
    22.03.2012 at 22:15

    I want it!!!

  6. craig_chapman says:
    28.03.2012 at 17:27

    Drooling – when can we try this?

    • Jon Lennart Aasenden says:
      31.03.2012 at 12:20

      Today 🙂

  7. calinutz says:
    02.06.2012 at 00:03

    I just hope that by the time Embarcadero will buy your company in order to use your IDE as their own, you wont forget about the existing users and customers.

Comments are closed.

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