Friday, 29 June 2007

Real-world tools #4: JEDI-VCL

For as long as there has been Delphi, there has been Project JEDI: Joint Endeavour of Delphi Innovators (or Endeavor if you're Stateside). Initially it was created in order to write API header conversions for Delphi that weren't provided as standard. APIs such as DirectX, ODBC, MAPI, TAPI and Winsock were written and offered up for free with full source code - this was a labour of love and community, not money. It is Open source, distributed under the MPL 1.1 License. Furthermore, extensions were added to the standard headers that had been provided with Delphi, thus exposing more of Windows' capabilities to Delphi developers.

Soon this gave birth to the JCL, the JEDI Code Library. This was a massive set of utilties and classes that could be used, such as algorithms, conversions and literally hundreds of functions designed to make complex jobs easier. Instead of trying to get to grips with MAPI.pas and sending a mail, why not just call JclSimpleSendMail instead? Just going through the contents page on the help, you get an idea of just how much is available. In fact, there's so many that you just don't know where to begin but it's a good place to start looking if you need some complex string search routine or array sort.

But if the JCL is large then the JVCL (JEDI Visual Component Library) is simply enormous. Across 39 tabs, over 500 visual & non-visual components are installed ranging from improved replacements to standard Delphi components to wizards, gauges and trivial animated clocks and dice.

I said in my post on the TMS Component Pack that I'm not a fan of installing component packs and even though I've known about JEDI for as long as I've worked with Delphi, I only installed it early last year. It has come to the point where it isn't just a messy collection of components thrown together any more, it's a well-thought out and organised collection with "something for everyone", although largely I suspect you won't use 75% of them.

Early versions of the JVCL just had all the components that volunteers had written and submitted bundled together, with little documentation and no organistion. Along the way, they stripped out duplicates and integrated it with the JCL so that code reuse was the norm, not an accident.

Documentation is by their own admission "far from complete", as described in the help file overview: "Because of the size of JEDI-VCL and the fact that writing help takes a lot of time, the help file is currently far from complete, the main reason being that too much work has to be done by just a few people". The help is also available on-line at homepages.borland.com/jedi/jedihelp/ which is great because it is searchable. It also means that you can have a look though the help to see what is in there before deciding whether you want to take the plunge with it.

That said about the documentation, I've seen worse! Usually the stub is there added automatically by the documentation software and just needs padding out. But as several people commented with TMS, because you have the source, you can often go in and see for yourself how to use a method or how to set a property that isn't documented. And unlike TMS, you're actually encouraged to change what might be wrong and submit it back to the team.

There is also an online bug tracker at homepages.borland.com/jedi/issuetracker/main_page.php which uses the Mantis bug tracking system. I don't know who the team is behind it, but it is effective and well maintained, with issues being updated every day.

What you have to remember is that this is free software written and maintained by volunteers for no other gain than to improve the Delphi landscape and perhaps a small sense of personal satisfaction that one gets from seeing their name as part of a large project. And so they should because without all of those people who have contributed even a line of code to the source or the help, the JCL and JVCL simply wouldn't be a viable alternative to the commercial toolsets.

Often once you've installed a component package, you leave it because the installation was a nightmare and you're just glad you've got your IDE stable again - not going through that again! Well, the team behind the JCL and JVCL have obviously been burnt by that too because the installer is simply one of the best I have used on any commercial or non-commercial third-party component. Although it is really best to manually remove any existing installations of JEDI first and really make sure the files are deleted, once that is done then the detailed installer wizard makes putting the new version back on a breeze. You can choose what level of installation you want and the JVCL installer checks to make sure you have a high enough version of the JCL before continuing. I doubt this was easy work but it was worth it because I'm actually prepared to keep up to date with the releases.

This isn't a flawless product though, but I cannot bring myself to criticise a package that hasn't cost me anything and that has cost so many people a lot of their free time and expertise. I now regularly use their code and components; sometimes TMS doesn't have a replacement for a particular component and JEDI does; I'm happy to use these two interchangeably.

Bearing in mind that I am still on Delphi 6, I especially use the TjvImgBtn component which is a replacement for the Delphi TBitBtn. Any of you who have your software themed for XP and Vista will know that the Delphi TButton themes nicely but the TBitBtn and TSpeedButton don't. Although there's a little inconsistency in the JEDI button components, in that some theme and some don't, once I found the JvImgBtn I never looked back. In fact I went through all the software I wrote in the last 8 years and replaced SpeedButtons and BitBtns with this component. Furthermore, it doesn't use the Glyph property but it uses an ImageList and has an ImageIndex property. This has reduced my file sizes greatly, although I used to use an ImageList myself and assign the Glyph property at run-time - but all that code has gone now.

I defy you to install it and then not find useful components. You have to be prepared that it will add nearly 40 new tabs to your component palette and increase the loading and closing time of Delphi. But personally I believe this is a trade-off worth taking and the JEDI toolset has finally come of age. Free doesn't have to mean poor quality.

8 comments:

Unknown said...

The JVCL is huge. That has actually been one of the reasons that I have not adopted it to any great extent in my programs. The other reason is that I have been able to meet my needs with consistently good components from TMS. I probably use more code from the JCL than from the JVCL.

If I need a component and I am not sure what to use, I will often browse the TMS website and look for something that might work. If I find something, I download a demo and check out how to use the control. Even then, I try to avoid anything that might be hard for a user to understand. I'm not crazy about those new tool ribbons. I think they might end up being one of those interface things that are good to put behind us.

Anonymous said...

The new installers let you really cut out the garbage.

There is still plenty of fluff they could drop with out affecting anyone. I suspect that about 50% of the components will not ever be used by anyone, ever - it's just a matter of identifying that subset.

Unknown said...

Hi,

Thanks for the kind words, they are very appreciated by the teams here at JEDI.
We agree with you on the fact that the number of components could be further reduced and we are working on it but as "anonymous" said, it's quite hard to find the components that can simply be dropped. When not dropped, we try to provide a replacement and identifying what is worth merging into one component takes time.
But all in all, you can choose to install only a portion of the JVCL through the package selection and so if you don't need some of the components, they will not be there to take up some valuable memory resources.
Once again thanks for the kind words.

Kind regards
Olivier Sannier
JVCL Coordinator

PS: The URLs should be on homepages.codegear.com instead of homepages.borland.com since it is now Codegear which is providing Delphi.

Anonymous said...

JCL and JVCL are good. Huge but good. I rarely use JVCL components in my apps though, instead I use it as a resource to find out how things are done. I've learned a lot from JCL and JVCL sources.

Anonymous said...

I don't use the visual comps much (yet), for fear of them changing from version to version as much as Indy ;(! BUT the functions and procedures with the Jedi Libary are awesome and honestly priceless.

Many apps would not have been possible without the JCL, they save time and are great learning tools.

Install them you will NOT be sorry.

Dissertation Help said...

This blog is very nice and informative. it is pretty hard task but your post and experience serve and teach me how to handle and make it more simple and manageable.
----------------------------------------
Dissertation Help | Custom Dissertation

dissertation help said...

it's good to see this information in your post, i was looking the same but there was not any proper resource, thanx now i have the link which i was looking for my research.

Baltimore hotels waterfront said...

YOU ROCK! Blog is so rich, we can get a lot of information on any topic. Thank author for it.