Changes in the mailing list

2 views
Skip to first unread message

Andrea Mangiatordi

unread,
Jul 29, 2011, 12:12:16 PM7/29/11
to Farfalla Developers
Dear friends,

so much time has passed since I opened this mailing list for the first
"Bergamo Code Jam". Recently, many websites (and newspapers too)
published articles about the Farfalla project. First, I would like to
thank you all for advising and supporting me in this adventure.

Second, as many of you may have already noticed :P, I am writing in
English. This is mainly because some weeks ago two Indian guys joined
the list, and I want to enable them to participate. From now on, the
official language for this list is English.

Third, here are my plans for the upcoming weeks:

- closing the two remaining bugs left on http://farfalla.lighthouseapp.com/
- updating the website, also creating a better italian version (the
majority of the people visiting it is actually made of Italians)
- adding some user guides "for dummies" to the website

After these three steps, I will start planning newer functionalities.

Cheers,

Andrea

Mario Ferraro

unread,
Jul 30, 2011, 5:53:18 PM7/30/11
to farfall...@googlegroups.com
Hi Andrea and hi everyone,

On Fri, Jul 29, 2011 at 5:12 PM, Andrea Mangiatordi
<andrea.ma...@gmail.com> wrote:
> Dear friends,
>
> so much time has passed since I opened this mailing list for the first
> "Bergamo Code Jam". Recently, many websites (and newspapers too)
> published articles about the Farfalla project. First, I would like to
> thank you all for advising and supporting me in this adventure.

I just came to know the project yesterday thanks to a website article
indeed, forwarded by a friend of mine, and, as Andrea already knows
since I contacted him privately, I'm willing to help.

> Second, as many of you may have already noticed :P, I am writing in
> English. This is mainly because some weeks ago two Indian guys joined
> the list, and I want to enable them to participate. From now on, the
> official language for this list is English.
>
> Third, here are my plans for the upcoming weeks:
>
> - closing the two remaining bugs left on http://farfalla.lighthouseapp.com/

About this, I think I can help on compressing Javascript files. I've
spent some time today setting up Farfalla in my computer and, before
doing some actual work on the code, I would like to let you know what
I would like to do in the short term, obviously iff these things are
on the same page with Andrea and the community. So here the list and..
just let me know your opinion. :)

- About JS compression, I've seen that we have mixed code: some code
is already compressed and some is not. I'd say it'd be better to leave
all uncompressed code in the repository (just in case we need to apply
some patches to existing code, even jQuery plugins, sometimes it
happens) and create a script for "release" that takes care of
compressing everything. The script should also take care of changing
the hardcoded URLs.

- Andrea told me that Farfalla has issues/potential issues when
loading scripts, to honor order and onload event and such things. For
this I'd like to integrate LABjs, which takes care of downloading
scripts asynchronously and evaluate them in the right order, honoring
dependencies easily.

- Working on setting up Farfalla locally, and testing it online,
there's something that is still unclear to me. The "backend" folder
seems to be the one that handles the profiles and so on, but the
actual toolbar and the rest of the code is downloaded online from
code.farfalla-project.org. Is there a particular reason why this is
not integrated with the actual PHP backend e.g. to download
farfalla.js and other JS plugins from the same server? It seems like
they're meant to come from different servers, and I was wondering
whether this is wanted or if it could be something I can work on.

- A small thing, but it helps readability (especially for small
screens and for editor compatibility), I'd suggest to indent using
spaces instead of tabs. If it's ok with you I can work on changing
that in the code myself.

All these are coming from a brief review of the current code and might
need different approaches when actually tested, but it's just to get
in touch with the community and see on what I could help.

Cheers,

Mario Ferraro

> - updating the website, also creating a better italian version (the
> majority of the people visiting it is actually made of Italians)
> - adding some user guides "for dummies" to the website
>
> After these three steps, I will start planning newer functionalities.
>
> Cheers,
>
> Andrea
>

> --
> http://www.farfalla-project.org
>
> Hai ricevuto questo messaggio in quanto sei iscritto al gruppo
> Gruppo "Farfalla Developers" di Google Gruppi.
>

Andrea Mangiatordi

unread,
Aug 1, 2011, 11:23:13 AM8/1/11
to farfall...@googlegroups.com
Hi,

> - About JS compression, I've seen that we have mixed code: some code
> is already compressed and some is not. I'd say it'd be better to leave
> all uncompressed code in the repository (just in case we need to apply
> some patches to existing code, even jQuery plugins, sometimes it
> happens) and create a script for "release" that takes care of
> compressing everything. The script should also take care of changing
> the hardcoded URLs.

the idea of a release script is very good. Giuseppe Capizzi already
suggested me something like this some months ago, and I think that the
right release script should include:

- files compression;
- the possibility to specify an install url (I will explain later in
this email what I mean by this);
- ftp upload to a specified server.

At the present day, the public demo of Farfalla, which points at
http://code.farfalla-project.org, is actually stored at
http://lisp8.formazione.unimib.it/farfalla/ - that's the machine I
normally use when I am at work in the university. I used this solution
since toay because I found very easy to update the public installation
via git. But a release script allowing to deploy everything correctly on
farfalla-project.org via ftp would be nice. Also because my little
server in unimib could go down everytime due to maintainance in the
building :S

> - Andrea told me that Farfalla has issues/potential issues when
> loading scripts, to honor order and onload event and such things. For
> this I'd like to integrate LABjs, which takes care of downloading
> scripts asynchronously and evaluate them in the right order, honoring
> dependencies easily.

Yep, it depends from this code snippet from farfalla.js, which is almost
self-explaining:

headID.appendChild(jqueryScript);
jqueryScript.onload = function () {
headID.appendChild(jqueryuiScript);
headID.appendChild(fmainScript);
}

I use .onload to be sure that jquery-ui and main.js are loaded when the
basic jquery has finished loading. But IE is the only browser not
implementing .onload :(
I am not shure that LABjs will work straightforward, unless we include
its code directly in farfalla.js... but it is worth a try.

> - Working on setting up Farfalla locally, and testing it online,
> there's something that is still unclear to me. The "backend" folder
> seems to be the one that handles the profiles and so on, but the
> actual toolbar and the rest of the code is downloaded online from
> code.farfalla-project.org. Is there a particular reason why this is
> not integrated with the actual PHP backend e.g. to download
> farfalla.js and other JS plugins from the same server? It seems like
> they're meant to come from different servers, and I was wondering
> whether this is wanted or if it could be something I can work on.

This is the point, almost. It is everything on the same server, in this
particular case the server is called with different names. But there's
more. Say you have your local farfalla install in
http://localhost/farfalla/. You can then include this code in a *local*
webpage:
<script type='text/javascript'
src='http://localhost/farfalla/farfalla.js'></script>
and have the toolbar active for that page. The toolbar will look for
http://localhost/farfalla/backend/profiles/menu/ to receive a list of
available profiles, then when a profile will be selected, it will turn
to http://localhost/farfalla/backend/profiles/retrieve/profile_id to get
the list of plugins associated with it.

> - A small thing, but it helps readability (especially for small
> screens and for editor compatibility), I'd suggest to indent using
> spaces instead of tabs. If it's ok with you I can work on changing
> that in the code myself.

That's a bad habit of mine. You can surely adjust it.

> All these are coming from a brief review of the current code and might
> need different approaches when actually tested, but it's just to get
> in touch with the community and see on what I could help.

Nice. I think that the release script deserves a whole new thread..

Hey, where ae the Indian guys?

Andrea

Mario Ferraro

unread,
Aug 4, 2011, 5:35:09 AM8/4/11
to farfall...@googlegroups.com
Hi Andrea,

sorry for the late response, been busy at work :)

I'd say there should be a script for the first two points that builds
everything in a specific folder. FTP releasing script can be done, but
it's easy enough to upload by FTP once the folder is ready. Other
people might want to release in a different way.

>> - Andrea told me that Farfalla has issues/potential issues when
>> loading scripts, to honor order and onload event and such things. For
>> this I'd like to integrate LABjs, which takes care of downloading
>> scripts asynchronously and evaluate them in the right order, honoring
>> dependencies easily.
>
> Yep, it depends from this code snippet from farfalla.js, which is almost
> self-explaining:
>
> headID.appendChild(jqueryScript);
> jqueryScript.onload = function () {
>        headID.appendChild(jqueryuiScript);
>        headID.appendChild(fmainScript);
> }
>
> I use .onload to be sure that jquery-ui and main.js are loaded when the
> basic jquery has finished loading. But IE is the only browser not
> implementing .onload :(
> I am not shure that LABjs will work straightforward, unless we include its
> code directly in farfalla.js... but it is worth a try.

Surely we would need to include the code in farfalla.js. I didn't try
yet, but it should work flawlessly. I've already integrated it in
Melange[0] and we use it currently without any issue at all.
However I'll try that and let you know.

>> - Working on setting up Farfalla locally, and testing it online,
>> there's something that is still unclear to me. The "backend" folder
>> seems to be the one that handles the profiles and so on, but the
>> actual toolbar and the rest of the code is downloaded online from
>> code.farfalla-project.org. Is there a particular reason why this is
>> not integrated with the actual PHP backend e.g. to download
>> farfalla.js and other JS plugins from the same server? It seems like
>> they're meant to come from different servers, and I was wondering
>> whether this is wanted or if it could be something I can work on.
>
> This is the point, almost. It is everything on the same server, in this
> particular case the server is called with different names. But there's more.
> Say you have your local farfalla install in http://localhost/farfalla/. You
> can then include this code in a *local* webpage:
> <script type='text/javascript'
> src='http://localhost/farfalla/farfalla.js'></script>
> and have the toolbar active for that page. The toolbar will look for
> http://localhost/farfalla/backend/profiles/menu/ to receive a list of
> available profiles, then when a profile will be selected, it will turn to
> http://localhost/farfalla/backend/profiles/retrieve/profile_id to get the
> list of plugins associated with it.

Got it :)

>> - A small thing, but it helps readability (especially for small
>> screens and for editor compatibility), I'd suggest to indent using
>> spaces instead of tabs. If it's ok with you I can work on changing
>> that in the code myself.
>
> That's a bad habit of mine. You can surely adjust it.

Cool, will work on it, too :)

>> All these are coming from a brief review of the current code and might
>> need different approaches when actually tested, but it's just to get
>> in touch with the community and see on what I could help.
>
> Nice. I think that the release script deserves a whole new thread..

Well it should be easy enough, we just have to decide what it should
do. But we need for sure to make at least the server configurable and
the JS compressed.

>
> Hey, where ae the Indian guys?

Looking forward to hear from them too :)

P.S.: it seems there is nothing that prevents the user to load a
plugin twice, this is something we should fix too.

Cheers,

Mario Ferraro

[0] http://soc.googlecode.com

Reply all
Reply to author
Forward
0 new messages