Bundle loader in FOWCore
I’ve made a basic bundle loader in FOWCore, so now it’s absolutely usable.
What’s FOWCore? That’s an FOW-based application, that you can use if you don’t want to go low-level with FOW. You write handlers in bundles, and then FOWCore will dynamically load and register handling stuff.
Currently that works via config file. First you list all the bundles you use:
<key>bundles</key> <array> <string>../test_servers/TestBundle/build/Debug/TestBundle.bundle</string> ... </array>
then you configure URL mappings, by providing URL regexp, class name, bundle for class and selector:
<key>handlers</key> <array> <dict> <key>url</key> <string>get/(.*)</string> <key>bundle</key> <string>org.hackndev.TestBundle</string> <key>class</key> <string>TestBundle</string> <key>selector</key> <string>handleGet:</string> </dict> <dict> <key>url</key> <string>post/(.*)</string> <key>bundle</key> <string>org.hackndev.TestBundle</string> <key>class</key> <string>TestBundle</string> <key>selector</key> <string>handlePost:</string> </dict> </array>
I’m considering two ways to configure a running FOWCore application: either by web interface (there would be thing like “webconf.bundle” in FOWCore) or by a configuration utility that would connect to FOWCore instance via unix socket.