Posts Tagged ‘develop’

Kepler a Lua Based Web Development Framework

Sunday, June 22nd, 2008

Lua is a very useful language for many things.  Extending core base code with modules and add-ons have made it very useful in game development but since Lua is table-based it can also be easily applied to web development. Well that time has come, See the Kepler Project for a nice collection of modules that make a good start for web development with Lua.

Kepler is an open source platform that brings the power of Lua to web development. There are a number of great Web development platforms out there but none balances portability, size, power and extensibility quite like Kepler does:

  • Being extremely portable and light means that it can be installed in very constrained devices as much as in providers that limit the amount of RAM and processing time for your scripts.
  • If you ever heard of the customization features of games such as World of Warcraft, think about all that power applied to web scripting.
  • Being extensible means both that we can extend the platform by adding new modules and that the users of the applications that you build can extend those applications using Lua.

Kepler was created by Fábrica Digital and PUC-Rio and is continuously being improved by a core team of commiters (see Dev Team) and lots of contributors (see Credits).

Kepler is free software and uses the MIT license model: it can be used for both academic and commercial purposes at absolutely no cost. See the Kepler License for more details.

Kepler is a platform that uses LuaRocks to offer Modules such as:

  • Page based and MVC XHTML generation (WSAPI, CGILua and Orbit)
  • SQL and XML processing (LuaSQL and LuaExpat)
  • Hash (MD5) and a pair crypt/decrypt
  • Zip files reading (LuaZip)

The Lua community is constantly contributing with more modules that can be used with the Kepler Architecture. Most of those modules are catalogued on LuaForge and new ones keep coming.

Unix installation

Please check UNIX Installation for a detailed view of how to install Kepler on Unix machines (including OSX).

Windows installation

Installing Kepler on Windows does not require any C compiler and should work on any Windows machine with internet access.

  1. Download LuaRocks and install it using install /SCRIPTS c:\luarocks\0.5.2
  2. Add the LuaRocks scripts dir to your system path (the same directory used in the /SCRIPTS parameter above)
  3. Install Kepler and Xavante using luarocks install kepler-xavante
  4. Configure everything using setup-kepler and following the instructions
  5. Use xavante to run Xavante as a tray bar application, or use ‘xavante_start’ to run Xavante from the command prompt. Another option is to run Kepler using CGI

Once Kepler is running, you might want to look at those pages:

The Kepler 1.1 Unix installer can be downloaded from its downloads page. Check the Installation page for more details and for the Windows installation instructions (using LuaRocks).

If you need the binaries for specifics Modules you can also get them from LuaForge, on the module respective project page.

Is Python Becoming A Market Baseplane Language?

Thursday, March 13th, 2008

Sun has been on a rampage lately. They recently purchased MySQL (which has some questions with InnoDB) but they also are supporting Python and integrating it into the VM offerings with Jython.

So now we have Google (They employ Guido), Microsoft (IronPython) and Sun (Jython) all turning into Python-istas. Does this mean Python is destined for greatness in the near future? Well I recommend learning it. It is a great language and it has a high productivity rate. Time will tell if it has the ability to be in extremely large code bases. I think it is just a matter of the architecture and organization as with any project.

Jonathan Schwartz at Sun mentioned also taking the “J” out of “JVM” to just make a VM much like a .NET framework. So Microsoft copied Java with C# the JVM and added multiple languages. Then Sun comes back and added multiple byte code compiled languages. And then they both focus on dynamic engines to implement versions of Python, Microsoft doing this within their DLR.

Many times the larger market languages that end up running business or “enterprisey” are heavily influenced by companies, in addition to the other demands from consumers, which here is programmers. So when the big three are all banking on Python as a draw there is a definite market draw there and a tell on the future. But I think it is apparent that Python is becoming a standard market baseplane language.

It is great to be able to use other libraries from .net with IronPython and java libraries with Jython. It has found a way to integrate with the current infrastructure and the language has low bar entry but deep benefits. Python is snaking its way into the market.

Python is so non verbose…

import sys
import clr
from System.IO import Path, Directory, FileInfodir = Path.Combine(sys.prefix, 'DLLs')

if Directory.Exists(dir):
    sys.path.append(dir)
    files = Directory.GetFiles(dir)
    for file in files:
        if file.lower().endswith('.dll'):
            try:
                clr.AddReference(FileInfo(file).Name)
            except:
                pass

This sample is from IronPython showing adding dynamic references to all dlls loaded.

Check out this HTML/XHTML parser in pure Python.

from HTMLParser import HTMLParserclass MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
print "Encountered the beginning of a %s tag" % tag
def handle_endtag(self, tag):
print "Encountered the end of a %s tag" % tag

Your Ad Here
Your Ad Here


baseplane – technology platforms is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

Unless othewise specified the content in this site is licensed under a Creative Commons License
Your Ad Here Your Ad Here Your Ad Here Your Ad Here