Database of Code Snippets

How do experienced Servoy users store their code snippets and methods for easy access when developing?

At the moment, the most intuitive way I can think of (for Mac) which allows styled copy/pasting and easy reference is PowerPoint!

Nick

You can create global methods.
You can use SubEthaEdit (David Workman once created a template for it based on the pre 4.0 Developer era).

Having said that, I could create an Eclipse Plug-in that does something like that.
Store code snippets in a database/file…

I’d just create templates in Eclipse for them, with an intuitive name.

You can then easily move them using code completion.

Paul

A couple more ideas:

1- A dedicated code module

2- TextMate. Great for storing and organizing code because of it’s tabbed display and project pane.

Another couple of ideas:

MyNotes is a great program for OSX Users - you can copy/paste just about anything into it and the search functions are great:

[attachment=1]Picture 1.png[/attachment]

Coda is a great HTML dev environment and also provides easy access to all SV4/4.1 workspaces so that code can be copy/pasted:

[attachment=0]Picture 3.png[/attachment]

Why use a separate app with the need to copy and paste when you have Template right there in Eclipse, which have the following added benefits:

  • being able to quickly move your template into your code using code completion
  • Ability to define in the template to automatically place the cursor at a certain point in the moved code
  • Ability to define in the template to automatically insert stuff like date, author etc.
  • Ability to define the pieces of code that the developer needs to customize and allow him to tab through those locations quickly after moving the code.

I do not really see the benefit of using external apps for this. What am I missing?

Paul

Thanks - all good stuff - I like the look of MyNotes.

Paul - it looks like I’ve missed something - how do I get to templates in Eclipse?

From the Menubar: Window - Preferences - JavaScript - Editor - Templates

Paul

Hi Paul

Have been away for few days so just catching up.

I do not really see the benefit of using external apps for this. What am I missing?

I don’t think anyone was ‘dissing’ Templates, but MyNotes etc have the advantage that anything can be saved into them - screenshots/forum threads etc - so better as a knowledgebase. I find Coda really useful because I can access any previously written code without having to think ahead and specifically save it as a Template.

Great to have all these opportunities to be even more efficient :D