Web applications unification

Mikael Karlsson mikael.karlsson@REDACTED
Wed May 28 10:32:14 CEST 2003


onsdag 28 maj 2003 01:08 skrev Wiger Ulf:
> On Tue, 27 May 2003, Mikael Karlsson wrote:
> > tisdag 27 maj 2003 13:36 skrev Ulf Wiger:
> > > I agree. I also added 'builder' to jungerl as an attempt to
> > > provide a lightweight aide for packaging OTP applications
> > > and building start scripts. I don't know how well it
> > > succeeded (and it does need more work).
> > >
> > > The general idea was that you should be able to
> > > incrementally build more and more complex systems with
> > > relative ease.
> >
> > Yes, hmm this means that one should use generic behaviours like
> > gen_server etc. in such a framework?
>
> If you want to use gen_servers, you could of course, but that has nothing
> to do with builder.
>
> The builder utility is intended to simplify the task of building .app
> files, .rel files, and finally .script and .boot files in order to start a
> system.
>
> When building a framework of different Open Source contributions, I think
> it helps to agree on a way to start the applícations. OTP provides such a
> way. What you want to do in the start function in order to get your
> processes running is another matter. I believe that the gen_server
> behaviour is quite useful, and I use it myself as much as I can, but it's
> not really something that affects your APIs, so it's normally an internal
> implementation detail.
>
Thanks,
I guess a good starting point for such a framework would be that one should
implement the generic behaviour API then, so that a supervisor can start the
application or by using application:start.
This seems to be the case already for most contributions, either "by hand" 
like in xmlrpc, or by implementing gen_{server,fsm,event} like yaws, btt,
inets/httpc_manager etc. Because those contributing knows how to do it 
since ages ago :-)
If you provide a library with no processes, like xmerl, then there is of
course no need for this.
Then you have a choice of using builder and making .app, .rel, .script and
.boot files or using application:start in your own code?
I guess that using application:start to start other applications from my own
app is fine as long as my own contribution is standalone, but as soon as it
integrated by others it should not. If I for instance wan't to incorporate 
BTT, (Bluetail Ticket Tracker), as a part in a larger application that also 
uses Yaws, I probably do not wan't BTT to start and configure the Yaws
webserver. Just as an example, BTT is great.

/Mikael




More information about the erlang-questions mailing list