Home > JavaScript, Object Pascal, OP4JS, Raspberry PI, Smart Mobile Studio > The Smart Pascal competition!

The Smart Pascal competition!

Probably the coolest mini-pc in the world

Probably the coolest mini-pc in the world

I recently found myself in possession of probably the hottest piece of hardware on the market, the Raspberry PI 2 model B. This is the super funky version with roughly 10 times more speed than it’s predecessor, double the ram and more USB ports. It is capable of running Microsoft Windows 10 [ARM edition] when that arrives.

Well, now is the chance to win this puppy and have it sent to your doorstep!

Smart Mobile Studio

Back in 2012 Optimale Systemer AS held a Smart Mobile Studio competition where the winner got an iPad 2. And boy did we get some cool entries (!) Loads of classical 16 bit demo type projects which in my view is one of the best resources for beginners to learn from. The result is that Smart Mobile Studio ships with a ton of cool demo’s, ranging from phong shaded polyballs to high-quality WebGL landscape demonstrations.

While visual demonstrations are great, this competition is of a more serious type. Namely who can write the best Smart Mobile Studio custom-control!

Note: I must underline that this competition is not held by Optimale Systemer AS, but rather Delphi Developer, if you are not yet a member of our Facebook group, click the link and visit us!

Rules

  • No-one from the SMS team may enter the competition
  • You must be the author of the code you submit
  • External JS is allowed, but within reason (*1)
  • Write clean-cut, commented object pascal as much as possible
  • The code must be made open-source so others can learn from it
  • The control must make use of effects (*2)
  • Controls must conform to standard (*3)

*1: The goal here is Smart Pascal component writing, which means that JS is allowed but focus should be on providing a Smart Pascal solution. A thin wrapper around some external library is not really your creation. But we do allow the use of third party JavaScript libraries if their use can be justified.

*2: The w3effects.pas unit contains classes for triggering CSS transition effects. You can also edit the style-sheet and add your own CSS effects directly there. The use of tween.js is allowed, you may also use the Smart Pascal QTX library which makes effect programming child’s play. If effects are inappropriate for your particular controls, you may omit them naturally, but the goal should be to create controls With pleasant visual feedback when you interact with them. Also remember that CSS classes map directly to the control name. So if your control is called TMyControl, then a CSS class with the same name should be added to your stylesheet.

*3: With standards I am referring to ordinary control use, like overriding and deriving Your control from a valid visual ancestor (TW3CustomControl for instance). More than one Visual instance should be allowed on the form (unless the topic of your control dictates single instance use). No “special” (read: hack) way of initializing the control. Write a good one!

Inspiration

There are loads of cool JavaScript controls out there, ranging from the simple and elegant to the technically excellent. I strongly urge you to have a look at Chrome Experiments, which is a website dedicated to various effects and demonstrations for Chrome. Just remember that what this competition is about are controls. So it’s important to find something of value for others in their application design.

Coding controls is easy and fun!

Coding controls is easy and fun!

It could be something as simple as a HTML5 TPages (tab controls), a header control which animates it’s changes (e.g: you set backbutton.visible:=False and the button fades out rather than just vanish). Just have a look at TMS’s Delphi components for instance, which is very inspiring!

Or perhaps a 3D component? To achieve that have a look at our Sprite3d.pas unit which uses CSS to position ordinary DIV elements in 3D space. To add scene and perspective you must place them inside a container DIV with percentage size and perspective values — and voila, you have a 3D scene viewer component.

And last but not least, an old favorite of mine which I have implemented countless times in Delphi: The pixel editor control. With zoom, different drawing tools, grid, horizontal and vertical rules. It’s not hard to program but can be a little consuming once you get started.

Blast from the past component

Blast from the past component

Well — I have no intention of dictating what you should put into the competition, I write this only as a source of inspiration to provide some pointers as to what can be made.

If you havent written any Smart Mobile Studio controls before, dont worry. It’s a lot easier than native Delphi or FreePascal controls. Just inherit from TW3CustomControl, override InitializeObject (constructor) and FinalizeObject (destructor) and of-course ReSize() and you are well on you way. Just search this very blog for examples! The Smart RTL is rich in features, yet small and compact enough for expansion! You will notice how that Delphi 5 or 7 feeling comes back to you.

Just control-click your way around the RTL, just like you would in Delphi or Lazarus, and have a peek at the foundation classes. You will find it’s much smaller, easier to understand and ad-hoc than VCL or FMX.

Dates

Entries must be delivered by the 4 of April, so you have a whole month to complete this!

Note: If too few people enter I preserve the right to cancel the competition. At which point the Raspberry 2 will be given to the most impressive component-programmer so far.

Judges

The judges will be myself, Peter and Glenn over at Delphi Developer where we serve as administrators (Facebook group for Delphi, FreePascal and Smart Pascal developers). If you havent joined the coolest Delphi group in the universe you can do that here: https://www.facebook.com/groups/137012246341854/

Contact

Send your submissions to lennart.aasenden AT gmail dot com, place “Smart competition” in the title!

Advertisements
  1. No comments yet.
  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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: