I'm happy about what Panda is today, yet there are a few things that could be improved / experimented:
MVC
The MVC pattern, applied in the whole application scope, is a little bit bold right now. The controller is handling all the requests, like the Rails way. I think it sucks. There is no visible alternatives yet, but this should be done better.
The state data is passed explicitly into views, and I like it this way. However, it might have to change, since views should get smarter, in particular, they should have their own states and be able to handle local effects.
Routing
Routing is done in Kibro. I would like automatic RESTful routes, or even custom module that does custom parsing on URLs. Haskell is statically typed, so there has to be a joint point somewhere.
This means that finally I'm going to have to look into Kibro's implementation, I was being so lazy.
Module
The current extension framework in Panda is a hack. There is no extension framework, the running of extension code is guarded based on global variables. Unfortunately, I don't know how to properly design a module system.
Slice
How should functionality be abstracted. The Rails way is to use web resources; WordPress to uses plugins; Cocoa to implement delegates. Since haskell is static, the Rails way is the most doable, but does it mean to post a comment to a resource, there has to be an RPC? Again, it can only be answered by experiments.
Extra
better error handling in IOs
form validation with informative feedbacks ( both client side and server side )
tools that facilitate blogging
models should really return Maybe type or Either type, while exception handled locally
some logging support ( right now, it just reports when exception occurs :D )
These are problems that I'm aware of, but not critical enough for me to implement.
Conclusion
I guess nothing is easy, even for something as simple as a blog engine ( Panda is basically built on CGI ). Kibro did a great job at providing a safe platform for me to pick my own tools, make my own designs and use any library I wished. Very few framework does this. Heck, Kibro is just a Monad, hardly a framework :D
BTW, how stable is Panda / Kibro / Haskell? From my experience, there could be logic errors ( false result ) or IO exceptions ( file not found ), but absolutely no crash, neither on production, nor development. No crash ever.
The reason I'm using html here is that markdown will generate <p> tags, which really screws up text alignment.
I consider Panda 2008 complete, updates will be bug fixes and critical add-ons.
There will be a Panda2 or PandaCute or something like that which continues the development of Panda, with new ideas. I wanted a simple blog engine, therefore piling up features is not going to happen in Panda's development. Panda is stable now.
instance Default State where def = State def def def def def def
Rails style humanized string conversion
1
show_data = show >>> snake_case
In conclusion, the code gets better ( I think ... ), yet correctness maintained, for not that I'm any good, quite the contrary, I suck. Then why I'm still blindly happily refactoring code without sophisticated tools or test suites as backups?
Haskell rocks
Tests are useful for sure, but coming from a dynamic world, trained to spec everything and constantly hold every piece of code in addition to the runtime in mind, Haskell just feels simple, relaxed :)
BTW, Panda is big enough. I used to hope to keep the code size under 700, but it didn't work out :) This is it. If more features are to be added, they should come as extensions. Though I need to find out a way to do that first...
summary_for_root = y
summary_for_tag = y
summary_for_rss = y
cut = ✂-----
cut is a user defined string that cuts the content into a summary and a continuation. It can be ignored completely, as usual.
An example post in this format would look like:
Post summaries can be enabled in `site.txt`:
summary_for_root = y
summary_for_tag = y
summary_for_rss = y
cut = ✂-----
✂------✂------✂------✂------✂------✂------✂------✂------✂------✂------
`cut` is a user defined string that cuts the content into a summary
and a continuation. It can be ignored completely, as usual.
An example post in this format would look like: