Hacker News new | ask | show | jobs
Ask HN: Interested in collaborating on a small site using this novel style?
5 points by parallelist 4498 days ago
I want to build a small website using a do-the-right-thing approach, near-to-pure functional style, in a dynamic language, without any existing frameworks i.e. minimal and back to basics. This is as an learning / experimental exercise or, in other words, for fun! Anyone, ideally in the London area, interested in collaborating with me on it? Or know someone who might be?

I've been programming since 2002 but design and architecture has always been my thing. I'm not fussy who I work with as long as you are nice. Just want to do something with someone else for a change

What the website does doesn't matter much to me. I was going to do a Twitter clone because that's very simple and everyone gets what it is supposed to do/be. But it could be anything really

I really want to try using a layers-based architecture where data goes through a pipeline starting with the database and HTTP request, through various stages, until a response is formed and sent to the client; sort of analogous to the way a compiler works. It's a bit different from MVC and I think it could be pretty sick :)

Here's a rough rundown of the architecture: http://pastebin.com/he89yYHC I could explain it in more detail to anyone interested

I also have a flexible design process that would allow the design within each of these layers to emerge quite naturally so it's not big design up front

If interested please tweet at me @parallelist_ or respond to this thread here

Thanks!

3 comments

The architecture doesn't look much different from MVC/MVP: controllers (interfacing layer), models with query methods, views/presenters (bridge layer/rasterization). Do you have a more detailed write-up of those ideas?
Interesting point. I’m not familiar with MVP but I guess I associate MVC with OO which I’m so over. I don’t see MVC as a pipeline of values but just kind of a way of vaguely separating things out and one that is easily and often corrupted. By contrast this would as pure (as in functions) as possible so each layer would communicate with each other layer exactly once for each request. I guess the principles are largely the same I’m just trying to do it with more rigor
Oh, I’ve just realized another difference. The model, as I refer to it is different from that in MVC. In MVC the model is usually a representation of database tables or "an interface defining the data to be displayed or otherwise acted upon in the user interface" (WikiP). For me it is the bit that preforms whatever work the user requested. So it’s pretty misleading of me to call it the model really because I’m not really all that concerned with modelling anything, I shall refer to it as the action layer from now on, I think
The common MVC project uses "fat models", where each Model encapsulates it's respective business logic. Then the Controllers simply decide which methods to call from the Model, call other necessary services and manipulate the data to respond with a specific format; what you describe would be a "fat controller/skinny model", or maybe a service layer. You'll end up with some kind of Model either way, data structures will have to be defined somewhere.

I'm conflicted whether dropping the known patterns and established terms for this architecture is a good or bad idea, but it's interesting nonetheless. It's quite hard for a newcomer to grasp and implement MVC correctly, an architecture with clearer nomenclature and concepts might be helpful.

I don’t see how you have inferred a fat controller and skinny model from my description. In fact I use the terminology of interfacing to describe what others here have interrupted back into MVC terms as a controller. That should be an indication as to the extent of its role i.e. not that large

My action layer is definitely fatter than the usual model because it does all the real work (that which persists) associated with a particular request. You could argue it is equivalent to involving several of the traditional models. I think it might also be fair to state that this represent an absence of architecture in that particular area and I would agree but there is nothing to suggest that you couldn’t create models with the action layer if you felt it was useful. Strictly speaking I’m against that sort of thing until I see a good case in front of me why I should do it. Writing queries is not so bad that I want to put something in front of it to automate it

Not in London, but gl man! Sounds like a interesting endeavor.
Do you plan to use clojure?
I was thinking a scripting language really: JavaScript/CoffeeScript/TypeScript (presumably using Node), Lua, Python, etc. Even PHP is acceptable because I have evolved a particular style in that language that I find makes it significantly less unpleasant than most would imagine

I’m not completely against Clojure. I tried it for a couple of weeks many years ago and found it kind of difficult somehow. I’ve done a reasonable bit of Haskell since so it would probably be better now. My first choice for a lisp would be Racket. I’m not saying no, we’d have to discuss it more I think. Isn’t the big justification for Clojure the Java libraries?