Using Lazarus to demystify Linux.

Posted by mariuz on Nov 17, 2005 7:25 AM EDT
http://www.lazarus.freepascal.org; By silentcoder
Mail this story
Print this story

For the past four years, I have been the Chief Software Architect for OpenLab international, the company that created the OpenLab GNU/Linux distribution. Over that period, Lazarus has long been included in the distribution, but what fewer people realize is how critical it is to the actual distribution development. Read on for some insight into how we use it."

silentcoderwrites "For the past four years, I have been the Chief Software Architect for OpenLab international, the company that created the OpenLab GNU/Linux distribution. Over that period, Lazarus has long been included in the distribution, but what fewer people realize is how critical it is to the actual distribution development. Read on for some insight into how we use it.

​ ​​​​The first ever Lazarus program to be written for OpenLab was the orriginal version of OLAD (the OpenLab ADministration tool), at the time it was a fairly simple little admin tool that could do a few basic things like managing users or launching a cd-burning application.
It's popularity took us all by surprize, clearly our customers were saying - we want an integrated system administration tool, a swiss army knife for maintaining our systems. Now a very large part of our user base is schools, where the administrators are often teachers and rarely very technically skilled.
That defined a lot of what OLAD would become. So we looked for inspiration at the XP control panel, at other admin tools such as drakconf, tried to find the things that were right about them, but also the mistakes.

OLAD has grown since those early days, and one reviewer of OpenLab 4 described it like this:
"significant value is in the addition of the OpenLab Administration screens which does everything from add and removing users to arranging backups. The network tools are very simple to use and even with the Live version I had my ADSL connection setup and running in no time. " (tectonic.co.za)



The nice thing is that although it took quite some time to write it wasn't actually all that complex, I developed two new components, one that calls back to xlib to allow me to auto-maximize windows, and one that acts as a read-only memo-like component that changes the text colours based on the content (a super simple markup language is used, and this is how we do the colorized help on the left), for the rest, it's basicallly a tnotebook with buttons on it. The one other major change is that instead of normal dialogs, I used tgroupboxes which are hidden/shown on demand, integrating the entire interface into a single window.
Now normally, coming up with a design like this would take weeks or months for people highly trained in user interface design. Lazarus changed that, before we began to write OLAD 4, I used it's rad abilties to do a whole bunch of mockup's, these were tiny programs that didn't actually have functionality but did just enough to show how the app would work if that design was followed, these runnable mockups were sent to key customers to vote and comment on, and from this we gleaned a first hand knowledge of what they liked and disliked. Lazarus made this possible because each of these mockups took less than half an hour to code (I actually spent more time designing button labels in gimp) so we could do a good half-dosen for people to try out, and because of it's cross platform abilities, I could compile these mockups for windows machines as well, to get input from people who aren't on Linux yet.
The network tools described in the review, actually has a sepperate orrigin, in earlier versions of OpenLab we had created a unit called seth (simple ethernet), which has all the functionalities needed to configure networks, on top of this came gseth, a fairly nice little lazarus program to give a GUI for it. With OLAD4 we wanted integration, so gseth was dropped, but by simply adding seth to my project I could reuse my existing unit, to feed a new interface.

Appart from OLAD, we've used Lazarus to create tappytux, an educational game - for which gamepack was developed (double-buffer and sprite components for lazarus) , and in fact even the interface for our installer is done in lazarus (by reusing the same components, I could make it follow the same design as OLAD, but converted into a wizard application).

All the code for the above, including the components, are GPL'd, and can be checked out from the subversion repository on silentcoder.co.za (http://www.silentcoder.co.za/viewsvn).
When you work under tight deadlines, ugly code can sometimes be a consequence and this perhaps above all is why we use Lazarus, because Object Pascal gives you a language that is so structured that even ugly OP is more beautiful than the most beautiful code in nearly any other language"font>

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Community, Debian, Fedora, Gentoo, GNOME, GNU, Microsoft, Red Hat, Slackware, SUSE

« Return to the newswire homepage

Subject Topic Starter Replies Views Last Post
Using Lazarus for creating a daemon to drive a tablet pakachunka 0 1,339 Apr 13, 2008 2:25 PM

You cannot post until you login.