Dragonfly - a web framework for newLISP

A web framework in newLISP

Postby xytroxon » Mon Sep 07, 2009 11:10 pm

Is BSD The New GPL?

Note: Zed Shaw is the former Ruby language programming guru, now Python language advocate... Zed does not mince words over his opinionated views on programming, and does not suffer fools (or Rubists ;) lightly... That said, he is usually right... And now prefering GPL over BSD for his new works... But most people nowdays, that don't want to suffer the pains of trying to figure out (let alone try to strictly follow), either license's rules, just throw up their hands and use the MIT license, as the least painful license for simple works they wish to share... Of course that p*sses the GPL's Richard Stallman off to no end ;p)

http://en.wikipedia.org/wiki/BSD_licenses

http://en.wikipedia.org/wiki/GNU_General_Public_License

http://en.wikipedia.org/wiki/MIT_License
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976
xytroxon
 
Posts: 295
Joined: Tue Nov 06, 2007 3:59 pm

Postby hilti » Tue Sep 08, 2009 5:18 am

xytroxon wrote: But most people nowdays, that don't want to suffer the pains of trying to figure out (let alone try to strictly follow), either license's rules, just throw up their hands and use the MIT license, as the least painful license for simple works they wish to share...


That's why I use the MIT License.

What are the benefits when I use the GPL License for Dragonfly - are there any?
--()o Dragonfly web framework for newLISP
http://dragonfly.uberberg.com
hilti
 
Posts: 138
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Postby TedWalther » Tue Sep 08, 2009 6:25 am

cormullion wrote:just out of interest, what's the difference between the suggested licences?


I think the modern two-clause BSD license is shortest and easiest to understand.
TedWalther
 
Posts: 585
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC

Postby xytroxon » Tue Sep 08, 2009 8:25 am

Here's an article, that for several possible advantages, such as for profit use, suggests the Apache License:
Does GPL still matter?
Jagielski claims that Apache's licensing terms are written to be comprehensible to people with no legal training. "It's very, very easy to read and understand, so it's a less risky license for external companies to use," he says.


http://en.wikipedia.org/wiki/Apache_License
... as of July 2009, over 5000 non-ASF projects located at SourceForge.net are available under the terms of the Apache License.


The Apache Software Foundation and the Free Software Foundation (FSF) agree that the Apache License 2.0 is a free software licence, compatible with version 3 of the GNU General Public License (GPL).

However, the Free Software Foundation considers all versions of the Apache License (as of 2007) to be incompatible with the previous GPL versions 1 and 2.


-- xytroxon
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976
xytroxon
 
Posts: 295
Joined: Tue Nov 06, 2007 3:59 pm

Postby hilti » Thu Sep 17, 2009 7:26 pm

... counting 37 downloads at Google Code :-)

I'm just wondering if anybody else uses Dragonfly for his projects? One project beside my own website is here: http://daycaster.org

Cheers
Hilti (working on version 0.20)
--()o Dragonfly web framework for newLISP
http://dragonfly.uberberg.com
hilti
 
Posts: 138
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Postby cormullion » Thu Sep 17, 2009 9:02 pm

i do! http://unbalanced-parentheses.nfshost.com/

I think it's great. I've found Dragonfly easy to use and reliable. The only problem is that when a new version is released it's quite hard to work out which files to install, which to modify, and which to ignore. Perhaps that's a difficult architecture to design...
cormullion
 
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W

Postby Lutz » Thu Sep 17, 2009 9:31 pm

Lutz
 
Posts: 5232
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Postby Kirill » Fri Sep 18, 2009 7:24 am

hilti wrote:... counting 37 downloads at Google Code :-)

I'm just wondering if anybody else uses Dragonfly for his projects? One project beside my own website is here: http://daycaster.org

Cheers
Hilti (working on version 0.20)


Not yet, but I consider dragonfly (to try it out) for a PSI server.
Kirill
 
Posts: 75
Joined: Wed Oct 31, 2007 1:21 pm

Postby hilti » Fri Sep 18, 2009 9:40 am

Kirill wrote:
Not yet, but I consider dragonfly (to try it out) for a PSI server.


Hi Kirill

what is a PSI server? Never heard of it.
--()o Dragonfly web framework for newLISP
http://dragonfly.uberberg.com
hilti
 
Posts: 138
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Postby hilti » Fri Sep 18, 2009 9:42 am

Lutz wrote:http://www.ohloh.net/p/dragonfly-newlisp


That's just me, Lutz ;-)
--()o Dragonfly web framework for newLISP
http://dragonfly.uberberg.com
hilti
 
Posts: 138
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Postby Kirill » Fri Sep 18, 2009 10:31 am

hilti wrote:Hi Kirill

what is a PSI server? Never heard of it.


PSI stands for Public Subject Identifier (in the Topic Maps world that is). A PSI is an URI that servers two purposes: as a unique identifier for a subject and as a URL which can be entered into a browser to provide the end-user a description of what the subject refers to.

psi.ontopedia.net is a PSI server.

-- Kirill
Kirill
 
Posts: 75
Joined: Wed Oct 31, 2007 1:21 pm

Re: dragonfly web framework license

Postby joejoe » Thu Oct 01, 2009 6:48 pm

joejoe wrote:hi hilti - looks like really cool code you've released.

im curious to know why you chose the mit license instead of the license that newlisp uses, the gpl? any chance you might consider the gpl for future releases?

thanks in any case! - :0)


i either misread or youve updated the license to gplv3 (like nL) !! :D

thanks for this, hilti! im downloading right now!
joejoe
 
Posts: 134
Joined: Thu Jun 25, 2009 5:09 pm

Postby hilti » Thu Oct 01, 2009 7:06 pm

That's right. I've updated the license to GPL (v3), because I didn't see any difference (for my intention) between MIT License or GPL.

I just want the Dragonfly to be open source and free available.

Cheers!
Hilti
--()o Dragonfly web framework for newLISP
http://dragonfly.uberberg.com
hilti
 
Posts: 138
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Postby hilti » Mon Oct 12, 2009 8:21 pm

Dragonfly version 0.20 is ready for download!

The major changes

* changed license from MIT to GNU (GPL v3)
* updated web.lsp to version 0.3.1 beta
* updated nldb.lsp (draft of 2009-09-11 20:42:48)
* added the file "dragonfly.js" which includes some small javascripts which support the Dragonfly framework (AJAX, iPhone, Dragonfly Guide Menu)
* added the first AJAX function to Dragonfly: ajax-updater (check out the twitter demo)
* added a Dragonfly guide (it can be opened with /dragonfly_welcome/index)

There will be a Dragonfly User Guide in near future. Have a look a the draft: http://dragonfly.nfshost.com

The Dragonfly ajax functions in action:
http://dragonfly.nfshost.com/dragonfly_ajax/index

Download it here
http://code.google.com/p/dragonfly-newlisp/downloads/list

Have fun!
Hilti
--()o Dragonfly web framework for newLISP
http://dragonfly.uberberg.com
hilti
 
Posts: 138
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Postby cormullion » Mon Oct 12, 2009 9:11 pm

Cool! Will upgrade soon...
cormullion
 
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W

thanks for the user guide

Postby joejoe » Mon Oct 12, 2009 10:14 pm

the user guide really helped me get up and running in less than a minute. thanks!
joejoe
 
Posts: 134
Joined: Thu Jun 25, 2009 5:09 pm

Re: Dragonfly - a web framework for newLISP

Postby cormullion » Fri Nov 06, 2009 4:57 pm

Is your new version 0.50 available to non-Mercurial users yes?

(I gather Mercurial is another thing like git or subversion...?)
cormullion
 
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W

Re: Dragonfly - a web framework for newLISP

Postby itistoday » Sat Nov 07, 2009 2:11 am

cormullion wrote:Is your new version 0.50 available to non-Mercurial users yes?

(I gather Mercurial is another thing like git or subversion...?)


It will be ready sometime this month, but there's still some work to be done before we make a release.

Mercurial is a DVCS like git (SVN is not a DVCS), it's pretty simple to use, just takes a little reading and then you'll get the hang of it.

Short instructions:

To grab a copy from the repo:

Code: Select all
$ hg clone https://dragonfly-newlisp.googlecode.com/hg/ dragonfly-newlisp


To update your copy (I would do this once a day):

Code: Select all
$ cd dragonfly-newlisp
$ hg pull -uf


If you're not committing code, that's really all you'll need to do anyway. :-)

To run the example-site, read the README and the INSTALL documents.
Get your Objective newLISP groove on.
itistoday
 
Posts: 413
Joined: Sun Dec 02, 2007 5:10 pm
Location: I'm sitting right next to you. :)

Re: Dragonfly - a web framework for newLISP

Postby cormullion » Sat Nov 07, 2009 2:58 pm

thanks... I managed to obtain a copy (thanks!)

I'm now trying to copy my content over to the new framework. It's not going too badly, but there are a lot of changes from the version I'm using!

Edit:

OK, I haven't figured it out yet. These are the kind of URIs I want to handle:

http://unbalanced-parentheses.nfshost.com/syntaxmatters
http://unbalanced-parentheses.nfshost.c ... eerswanted
http://unbalanced-parentheses.nfshost.c ... e-glypher/ -> directory containing index.cgi
http://unbalanced-parentheses.nfshost.com/downloads -> directory

I used to test the selector:

Code: Select all
(if (= "" Dragonfly:selector)


and provide a default page if I didn't find the string I wanted. What's the mechanism for doing this?
cormullion
 
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W

Re: Dragonfly - a web framework for newLISP

Postby hilti » Sat Nov 07, 2009 7:55 pm

Hi Cormullion!

Just a short help to Your "downloads" problem: You could use a static route to it described on this page in the User Guide: http://www.rundragonfly.com/dragonfly_routes

Put this into your view
Code: Select all
<% (link_to "Downloads" "downloads") %>


About the selector:
I've to test some things out, but maybe you can create your own route described here
http://www.rundragonfly.com/dragonfly_create_routes

Hope this helps!
Hilti
--()o Dragonfly web framework for newLISP
http://dragonfly.uberberg.com
hilti
 
Posts: 138
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Re: Dragonfly - a web framework for newLISP

Postby cormullion » Sat Nov 07, 2009 8:16 pm

Thanks for the help! I'm not sure I really know what a route is.

In the last version, I had code in the 'view' that took action depending on the selector:

Code: Select all
<div id="right">   
    <% (Dragonfly:load-database "blog.nldb") %>
   
    <% (if (= "" Dragonfly:selector)
           (set 'query (nldb:select-rows 'nldb:stories true true 'nldb:story-date >))
           (set 'query (nldb:select-rows 'nldb:stories '(= nldb:story-id Dragonfly:selector)))) %>
   
    <% (unless query (set 'query (nldb:select-rows 'nldb:stories '(= nldb:story-id "aboutthissite")))) %>

    <% (set 'story (first query)) %>
    <% (println {<h1>} (story 2) {</h1>}) %>
    <% (println {<small>} (story 0) {</small>}) %>
    <% (println (last story)) %>

</div>


Do I put this code in a .lsp file in 'plugins-active' (the static route you're talking about)? I would have thought it belonged in the view.

Forgive the stupid questions - I'm trying to catch you up but you're going too fast for me.:)
cormullion
 
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W

Re: Dragonfly - a web framework for newLISP

Postby itistoday » Sun Nov 08, 2009 2:01 am

cormullion, I've updated the dragonfly_routes page with some more detail, read through it carefully, it should explain what they are and how they work. Also, take a look at the page on creating templates (also in the guide).

As of this post it's not up on rundragonfly.com, so view the example-site in your web browser locally using newlisp as the server (again, see the INSTALL and README files if you don't know how to do this). Before doing that though you'll need to pull the latest changes as I showed above first.
Get your Objective newLISP groove on.
itistoday
 
Posts: 413
Joined: Sun Dec 02, 2007 5:10 pm
Location: I'm sitting right next to you. :)

Re: Dragonfly - a web framework for newLISP

Postby itistoday » Sun Nov 08, 2009 4:03 am

cormullion wrote:In the last version, I had code in the 'view' that took action depending on the selector:

Code: Select all
<% (if (= "" Dragonfly:selector)


BTW, Dragonfly:selector has been removed. Views no longer have selectors or actions, if you want something like that either make a resource (see the guide on the RESTful route) or use GET/POST parameters with your views instead, or create your own route. If you need help, check the docs, they probably have the answer to your question, but if they don't let us know!
Get your Objective newLISP groove on.
itistoday
 
Posts: 413
Joined: Sun Dec 02, 2007 5:10 pm
Location: I'm sitting right next to you. :)

Re: Dragonfly - a web framework for newLISP

Postby cormullion » Sun Nov 08, 2009 2:15 pm

Thanks guys, Dragonfly is looking pretty impressive now. I've been reading the docs again. You've done a nice job.

Here's my problem. I already have the URLs I want (see above). I don't think I can use "RESTful routes" because the first value in these (the resource) has to be the name of the context whereas in my URLs I want it to be the name of the ID (the specific object in the collection). I don't want to create static routes because I don't want to create a page for each ID.

I suppose I'll have to use .htaccess to rewrite the incoming URL to insert a 'resource' identifier before the ID, and then use the 'action' to store the ID and pass it on to the .lsp resource. And then I can just go 'print' to output HTML? But then what happened to the template...
cormullion
 
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W

Re: Dragonfly - a web framework for newLISP

Postby itistoday » Sun Nov 08, 2009 4:33 pm

cormullion wrote:I don't want to create static routes because I don't want to create a page for each ID.


I looked at your URLs again (I hadn't really read your original post) and it seems like creating a page for each of those is the solution you're looking for, otherwise you're not really using Dragonfly to your advantage and end up rewriting a lot of the stuff that it handles efficiently and cleanly for you. You also end up with a massive single file that has a huge if/else block in it...

I'd consider splitting all of your pages into separate files the way the example-site does, but if you don't want to do that then just disable both of the default handlers in config.lsp and create your own route (as described in the guide). Your route would simply grab the first part of the request URL, set the DF:selector, and display your main file. Or you could even check the $GET parameters, i.e.: (if (nil? ($GET "downloads/foo")) ...)

Documentation on all of that ($GET, how to display files, etc.) is in the Core API (linking to my copy since rundragonfly.com currently isn't updated):

http://www.taoeffect.com/dragonfly-newl ... gonfly_api
Get your Objective newLISP groove on.
itistoday
 
Posts: 413
Joined: Sun Dec 02, 2007 5:10 pm
Location: I'm sitting right next to you. :)

PreviousNext

Return to Dragonfly

Who is online

Users browsing this forum: No registered users and 1 guest