08 February 2011

Improving erlide project structure

[cross-posted from the erlide-devel mailing list]

We have discovered that it is more and more difficult for us to introduce new features in erlide without breaking anything and realized that one of the reasons is because assumptions about the project structure are spread throughout the code and some times are even implicit. New features that don't follow these assumptions get weird errors and when the apparent problem is fixed, other problems appear in other parts.

The way to improve the situation is by:
  • getting a picture of what we'd like things to work like
  • using unit tests as "live specifications" for the desired functionality. Note that this is slightly different than introducing unit tests for current functionality.
  • changing the code in small steps until it conforms to the tests/spec


There should be only one source of information in the system - the model of the projects and of the source code. The basic model should be possible to extend by extra tools (for example, a test framework may specify additional source code directories). These tools might also specify their own processing of the sources (for example, a coverage tool might require special arguments for the compiler; or a code-generation tool might require a script to be executed before compilation). The basic model should not have to be changed to accommodate for these extensions.


More about this later.

6 comments:

Bromokun said...

Dear sir,

Since I started learning erlang OTP in windows (during my free time), which is 8 months ago, I already fall in love with erlide in eclipse (I use eclipse for java a long time already).

Currently I need to build an erlang web application, using mochiweb. And most of the examples I found in the web is by using REBAR & MAKE command. Maybe this is due to the facts, many erlang programmer are using Linux based OS, which I'm not.

I'm wondering if you could show me how to develop erlang web application, using erlide.

Thanks
Bromo

Bromokun said...

Dear sir,

Since I started learning erlang OTP in windows (during my free time), which is 8 months ago, I already fall in love with erlide in eclipse (I use eclipse for java a long time already).

Currently I need to build an erlang web application, using mochiweb. And most of the examples I found in the web is by using REBAR & MAKE command. Maybe this is due to the facts, many erlang programmer are using Linux based OS, which I'm not.

I'm wondering if you could show me how to develop erlang web application, using erlide.

Thanks
Bromo

Vlad said...

Hi!

I'm glad to hear you like erlide.

We have no special support for developing web applications. You can start your application from erlide and open a browser to interact with it. Editing a module and saving it will also reload it, so you can see the changes right away.

I hope this helps. Best regards,
Vlad

Anonymous said...

Hello Vlad,
I do not know really if it's the right place to communicate with you, but I'm using erlide because it provides me what I like : code completion, and automatic code compilation when editing code, but unfortunately it seems that since version greater than 0.17.2 (or .5) there is an issue about the code compilation : the others file in error miss the red cross.
Best Regards
Pat

Vlad said...

Hi Pat,

The project's site is at https://github.com/erlide/erlide, it's a better place to leave comments.

I will check this out, but I think the problem was fixed in 0.18, did you try it?

regards,
Vlad

Vlad said...

Problem fixed in 0.19.0