559 karma · joined July 16, 2010
One of our early adopters was a very notable/early Shopify customer who encountered the kind of problems you describe with templates and customization. I am pleased to say they have been successful using Forward and Shopify combined in order to solve these problems, and are planning to migrate completely when the time is right.
Shopify is a great solution for small business without irregular catalog and checkout requirements. I am however surprised that they haven't done more to support businesses that grow beyond this stage.
I.e. fbd.find({someproperty: "123"})...
# controllers/BlogController.php
class BlogController extends AppController
{
function index ()
{
$this->entries = get("/channels/blogs/entries");
}
}
# templates/blog/index.html
{foreach $entries as $blog}
...
{/foreach}
Or, as in my example, this... # templates/blog.html
{get $entries from "/channels/blogs/entries"}
{foreach $entries as $blog}
...
{/foreach}
I've written substantial apps both ways, and so far I have found that powerful templates are actually easier to write, read, and maintain, perhaps because the entire request flow happens in a single file. {get $blogs from "/channels/blogs/entries"}
...
Alpha version was released just yesterday, you can sign up and download it at http://getfwd.com/shameless plug
Now it essentially means "control".
> DSLs (Domain Specific Languages) such as <%=foo%> or {{foo}} reduce portability
I would argue, well documented template DSLs increase portability among developers, which is often more important than portability among frameworks.
Private forums like Hacker News in no way infringe on the rights of others, by using their own property (web site) in a way they deem fit.
The problem with government funded health care is what you can't see. True market based competition leads to lower prices and greater innovation in all observable areas over time. That would mean more access for more people in the case of health care, but instead with deep government intrusion for decades, we have seen ever increasing prices and sluggish innovation.
Libertarian philosophy has a lot to do with a belief in sound market principles. Why should all that go out the window for health care?
The problems facing health care today, in my view, are largely a result of the free market being trampled on. People who don't really understand market principles will tell you the exact opposite, that health care has been nothing but a free for all, totally unregulated. Do you believe that?
It sounds like you might generally agree with libertarian ideas and some research on scholars like F.A. Hayek and Ludwig von Mises might help focus your libertarian perspective.
It's a lightweight system for building web apps in general, but it just so happens to have a few e-commerce APIs built in (which comes in handy if you ever decide to offer community subscriptions or sell t-shirts).
Obviously this won't help you immediately because it's not available to download yet, but will be in less than 4 weeks.
Here's a simple example of how you'd build a login page with it...
{if $params.account}
{get $account from "/accounts" [
login => $params.account,
role => "any-required-role"
]}
{if $account.errors == false}
{$session.account_id = $account.id}
{redirect "/welcome"}
{/if}
{/if}
<form method="post">
<input type="email" name="account[email]" />
<input type="password" name="account[password]" />
<button type="submit">Log In</button>
</form>
You can read more about it and sign up for the beta at http://getfwd.comGet rid of .json? Make it optional sure, but allow it if the client wants to be specific. Seems like a good feature in that sense (optional with a good default).
I agree that search should not be a resource, but perhaps a parameter for filtering in addition to explicitly named param filters.
Thanks for sharing your thoughts on it.
get("/accounts") // collection
get("/accounts", [limit => 10, page => 3]) // pagination
get("/accounts/email@address.com") // single record
get("/accounts/email@address.com/orders") // relations
get("/accounts/email@address.com/orders/10234/items/6/price") // deep relations
get("/accounts", [search => "john"]) // search
get("/accounts", [fields => "name, email"]) // partials
get("/accounts", [order => "name desc"]) // sorting
get("/accounts", [login => [...]]) // special conventions
post("/accounts", [alternate_email => $alt, ":validate" => [required => [alternate_email]]) // validation
put(...) // pretty much what you expect
delete(...) // same
The interesting thing about moving REST conventions to the model layer, is that you can suddenly create external facing APIs in various formats really easily. I'm hoping/expecting this will become a more common pattern.We've been running production e-commerce sites for many months now and haven't encountered a major issue in the lack of transactions across collections.
I don't feel any pain in writing HTML/CSS as it is. Also, I would feel a bit uncomfortable moving away from the underlying language, with the feeling that it might make writing/debugging regular javascript more difficult.