The OP4JS IDE (integrated development environment) aims to be simple, neat and clean. There are two reasons for this: First of all there is no point trying to catch up with products that have been in development for nearly two decades – and secondly because we don’t necessarily agree with the route some companies have taken with regards to their IDE’s.
If you ask a Delphi developer what his all-time favorite IDE is, chances are he is going to put the finger somewhere between Delphi 5 and Delphi 7. The environments back then were responsive, lightweight and easy to work with. The interface was so intuitive that even without formal training it required little effort to learn how to use the it. For me personally Delphi 7 is the undisputed king of IDE’s with one exception, like XCode it was a multi windowed environment which is a feature that messes up your work-space.
So for our IDE we turned the idea on it’s head. Since we are starting from scratch – why not use this opportunity to simplify things again? We have neither the time or manpower to catch up with the likes of Delphi, XCode or MonoDevelop. But what we do have is a keen eye on details and a desire to keep things effective.
Back to basics
What are the basics of a good IDE? What do we need to get our work done quickly and efficiently? What do I need?
- Tabbed source editing
- Syntax highlighting
- Method proposal (press “.”)
- Parameter hints
- Project tree-view
- Unit tree-view
- Property inspector
- Form designer
- A snippet library
- A proper note system
- A help system designed for human beings
- CTRL + mouse to quickly locate a symbol (or equivalent functionality)
Text matters
If you are anything like me you probably have a desktop littered with notes, books, gadgets and coffey mugs. Once a week I give my desk a run over, clean out the thrash and try to organize my notes in a logical, easy to use fashion. I also have a couple of huge whiteboards with important things kept in check by magnets. Fact is, text matters. It is through words that we formulate and transfer ideas.
Sadly the important of text and keeping our ideas organized havent really been implemented in most development environments. Delphi has a skinny “to do” list which is added to the project. I know a couple of people that use it – but let’s be honest: it’s pretty meager stuff. I mean, if I want to generate some form of documentation from my source-code, wouldn’t it be better to keep my notes in one place and my code in another? I’m not suggesting that we should stop commenting code, far from it, I’m simply saying that code-comments is more than enough for the code part. Adding documentation, ideas, who-did-what, credits and examples in the code is a bit excessive.
In short, OP4JS supports comments for every element belonging to the project. You can even comment on images if you like. But it’s not a simple text field or a memo – it’s a full editor. The view will actually split to make room for your notes and as such you can jot down everything (or just use it as a scrap-book when trying out new ideas). The comment editor has proven instrumental when porting Javascript to Object Pascal, because I can paste the JS code in the comment editor and convert it method by method with both sources in plain view. It’s also very handy when it comes to keeping track of who did what and where you last worked, just in case you forget between sessions.
Snippets as a resource
A snippet is just a piece of code that you use often or that you found online. Handy enough to keep but not essential enough to deserve it’s own unit. I haven’t really used snippets before but after implementing it – it’s quite addictive (!) Whenever I go online to search for a solution or study a particular task – the snippet library functions as my extended clipboard, if that makes any sense.
For the snippet repository in Delphi, I’ve used GExperts Code Librarian for ages. It is very convenient.
Combined with the Clipboard history, it’s powerful.
Good tip! We have GExperts installed, but i always wanted this function more up-front. And it’s nice that we can provide it out of the box.