What would be good (cross Smalltalk, mantained, documented) web frameworks or packages (in terms of fewer things to learn/adapt) to use for implementing a static web site with really few forms? .i.e. : a search box and a contact form. I have no "model" or application behind, so I'm not searching for CMS or web application capabilities.
There is any example or simple script of a static web site developed in any web frameworks? please I'm NOT interested in counter or 'Hello World' examples. The examples I've seen from Seaside looks too complicated, too many nested blocks with the "programmatic HTML" and the ones I've seen from AIDA needed a model object, couldn't figure how to get something working without a model.
All Smalltalk web-servers (Zinc, Kom, and Swazoo) can serve static files. If you take Pharo 1.3, Zinc is already pre-loaded. Just look at the code, tests and comments and you should get a server running in no time.
All Smalltalk web-servers (Zinc, Kom, and Swazoo) can serve static files. If you take Pharo 1.3, Zinc is already pre-loaded. Just look at the code, tests and comments and you should get a server running in no time. (via Lukas Renggli)
Taking some performance hit, you can have Seaside serve content as though it was static.
Related
Which Static Site Engine would make the most sense, if one was to make an online shop with dynamic content using e.g. Snipcart as the shopping cart?
I hooked Snipcart up to Jekyll and I've seen implementations using other static site generators as well, but I'm thinking the generator should either be light (as in capable of building fast) and/or just able to build dynamically (which most really aren't).
By dynamic content I mean the site should update/refresh fairly often, depending on e.g. warehouse content (limited edition counter - only 10 items left, then 9 etc.) and timed offers (e.g. 12 hour sale of an item) ?
I took a look at Broccoli-Taco since it has "Dynamically generated pages based on data", but I've yet to get it working (not given up yet).
However, static site generators are very new to me and thus I've come to this place of great guru's and wanted to see if anyone here has any good input ?
We've also had problems trying to use Broccoli-Taco for the first time this morning :confused: I work at Snipcart and we wanted to try it and see if we could maybe write a blog post about it.
However, we tried quite a few static site generators and we really love them ;) Here are some generators we liked:
Hugo is a static site generator written in Go, the compilation time is the fastest that we tried, and their documentation is awesome. I think it might be my favorite!
Roots is a static site generator in NodeJS, works very well, compilation is not as fast as Hugo but it still rules! Their documentation is also very well done and it's backed by Carrot, a nice agency in NYC so it should be more maintained than Broccoli-Taco.
Middleman is a static site generator in Ruby, similar in some ways to Jekyll. Works very well!
We have blog posts on Snipcart's blog for each of those static site generators, they might be useful to get started:
Static Site E-Commerce: Integrating Snipcart with Middleman
Static Site E-Commerce (part 2): Integrating Snipcart with Jekyll
Static Site E-Commerce (part 3): Integrating Snipcart with Hugo
Static Site E-Commerce (part 4): Integrating Snipcart with Roots
One last thing: you should really take a look at Netlify. These guys are running an awesome service that makes static sites hosting a breeze! Whenever you push updates to your website, update your data files or anything, they will automatically redeploy your site in seconds! We used Netlify a lot and it really rocks.
What are the differences between the three Smalltalk web application frameworks?
Some starting points:
What is the sweet spot for each framework? in Which case would you use one or the other?
What are their weaknesses?
Which one has the cleanest URLs?
How do they handle Ajax?
Do they have some preference in their use of persistence?
I'm just trying to decide which framework is appropriate for each kind of application.
I can only answer for Seaside:
Target: Seaside targets complex web applications with focus on reusability and development productivity. There is automatic session state management and back-button support. The two free online books Dynamic Web Development with Seaside and Seaside Tutorial provide documentation.
Weakness: For RESTful URLs you have to do some extra work.
Clean URLs: For RESTful URLs you have to do some extra work, but it can be worth it (e.g. Pier).
AJAX: There are plenty of AJAX libraries integrated in Seaside (jQuery, jQueryUI, Prototype, script.aculo.us, ...). The integrations give you full access to these libraries from within Smalltalk. New libraries can be easily integrated, e.g. JQueryWidgetBox.
Persistency: Seaside is a web application framework, not a persistency framework. You can use whatever persistency solution fits you the best, e.g. GemStone, GOODS, GLORP, ...
Also see these other questions/discussions on StackOverflow:
What is the difference between Seaside programmming and other web programming
Is Seaside still a valid option?
I can say something on the Iliad side:
Sweet spot(s): It handles AJAX painlessly. For me, that was the turning point that made me switch to Iliad. Also, it's so small and non-bloated that you can read the whole code in a day and have a grasp on how it works.
Weaknesses: The community is also very small. This results in a lack of documentation, additional modules or pre-made widgets. OTOH, small communities tend to be willing to help each other more eagerly, so pretty much all your doubts can be solved by asking at the mailing list.
URLs: Well, since all calls in Iliad are AJAX by default, the URL stays clean the whole time.
Ajax: Yep. For free and by default. You just #markDirty a widget and it'll update automatically. Dependencies are as easy to define as sending #addDependantWidget: to a widget, so that when the first is marked dirty, both will be updated. Also, if the client doesn't have a javascript capable browser, all calls will fall back to regular HTTP requests automatically.
Persistence: No preference. Since the model is separated from the framework (I think this applies for the three frameworks) you can still follow the same guidelines you would for Aida or Seaside.
And for Aida/Web:
Sweet spots: Realtime web support out of the box, for both content websites and complex web apps, HTML5 and mobile support, web server included so it works immediately after installation, you can serve many virtual websites from the same image.
Weaknesses: lack of documentation, small community
URLs: clean REST-like URLs all the time, because Aida follows from the start the moto: every domain object can have its URL (also by Alan Kay) and domain object can even choose its URL by itself.
Ajax: Seamlessly integrated, you don't see it anymore, all is just there. To refresh some element on webpage you simply call e update. No need to know any jQuery or some other JavaScript. Same goes for realtime web apps as well. WebSocket protocol is default communication channel on supported browsers to exchange JSON messages between browser and Aida based server.
Persistence: Image based persistence with automatic snapshot every hour is turned on by default. Gemstone/GLASS support provided for the next step. Relational/other DB is a duty of domain level, if needed.
For more:
Comparison of Smalltalk web frameworks from Aida centric
perspective
ToDo example in Aida/Web shows the newest realtime web/HTML5
features, as part of Comparison by example initiative
For some persistency solutions for Seaside, there is a page. Most of the solutions there are independent of Seaside.
I know this question is too wide to be answered with a simple "use this framework", but I would really appreciate your advice on that one.
I'm looking to make a (quite complex) project than will run over an API. I'm open to any programming language (PHP, Python, Java mostly) and found many frameworks that are more oriented to make a RESTful web server.
The only major constraint I have is that I would have a reusable, simple and not-code-spaghetti independent package in order to improve my API later easily or even switch to an other framework with no pain.
For Python & Java, I thought about making a dedicated package. Each action would call the dedicated method in the package, the package would return object/dict and the action would transform it to the proper format.
After many research, I hesitate between two framework that could be good for my work but I need your advice because I wouldn't make any mistakes here.
Play! Framework (Java)
Pros :
Router are RESTFul oriented (you define the method (GET, POST, etc), the request and the class.method to use)
You don't have to make one class per action
Cons :
The Model is already included. If I later change the framework, maybe I will be stuck with it (but apparently not since Play! seems to use JPA)
Maybe the fact that if I want to send parameters to the action that would be defined in the method signature, I have to adopt the ClassName.properties instead of a json like {ClassName: {properties: 'value'}}
Tornado Web (Python)
Pros :
Seems to be very powerful : used by FriendFeed (at least) !
Auth via major OpenId, OAuth and Facebook already implemented
Very light (could be a problem)
Cons :
Not so popular : you understand better the work by going into the code than the doc
Urls seems to be very basics (As far as I saw it, you have to define all the urls in one file, with all the class included)
One Class per action (that could be heavy)
Decorators for the basic (testing if user is auth, etc) must be made
For using them in production, it would be easily possible with apache & mod_proxy or nginx.
So, my questions is quite simple : what would you choose (between those two or others, I'm not closed to suggestions) and why ?
Thank you really much for your advice!
My favorite RESTful Web App development framework is Restlet. It's a Java framework/library (it can be thought of as either) but it works well with Jython and JRuby, so if you prefer those languages you could still use it. I mostly use it with Groovy.
I prefer Restlet because:
Its API fully embraces and aligns with RESTful paradigms, so it encourages you to work RESTfully. For example, when a Router routes a request to a ServerResource, it creates a new instance of the ServerResource for every request. This encourages the implementation to be stateless. And there's a rich class hierarchy with all the concepts required to implement a RESTful web app: Client, Server, Protocol, VirtualHost, Request, Response, MediaType, Status, etc.
Its API includes classes for writing both servers and clients, and they're very consistent and almost symmetrical. For example, there's a ServerResource class and a ClientResource class. ServerResource.get() and ClientResource.get() both return a Representation. The only difference is that you implement ServerResource.get() and generate a response representation, while you call ClientResource.get() and receive a response representation.
The API is consistent with Java conventions. For example, if a request made with ClientResource.get() receives an error response such as 401, a ResourceException will be thrown. And if you're implementing a ServerResource and want to return an error status, you just throw a ResourceException (which is a RuntimeException, which is nice).
Via its extension mechanism, it plays very nicely with a broad array of the best Java libraries around. Extensions are included for various HTTP client and server libraries, databases, templating libraries, security libs, data libs such as XML, JSON, OAuth, OData, etc., and even OSGI.
Deployment is very flexible. You can embed a Restlet-powered API in an existing Java app, an existing Java Servlet app, or any standard Java Web App (Servlet) server. Or you can build a stand-alone server app with an embedded HTTP server such as Jetty — that's my preferred approach. And because it runs on the JVM, it runs on almost any hardware or OS.
It's mature, reliable, responsibly maintained, steadily improving, and well supported both by the community and commercially.
It's open source, and has very clear and well-structured code. The developers are happy to accept any contributions. I've submitted a few patches and had them committed to trunk quickly with no drama.
Other options I'd suggest would be the Python microframework Bottle and the Ruby microframework Sinatra. They're both simple, straightforward, lightweight, and effective. And because they work with the WSGI and Rack stacks, there's a rich set of "middleware" modules which can easily be used with them.
I've been recommended the Click framework from Apache. But I can't find any forums talking about benchmark, reviews, advantages, disavantages, usefulness, ease of implementation, etc.
I've been asked to use it to develop a web site, but I'm completly in the dark about its strengths and weaknesses.
And its damn name isn't helping !! Click ? Hey Apache ! Call your next framework "the" just for fun. I dare you.
So can anyone comment on his experience with Click ?
What I personally like about the Click framework is that it is fairly close to HTML/HTTP and the Servlet API. There is no huge abstraction to get familiar with. You have a Page class, a Form class, ... If you need to preserve state across invocations you put it in the session or you pass it through the URL... This makes it easy to start using it. It is also straightforward to control the HTML pages being generated. It may sound like it is a very basic framework but the simplicity is actually one of it greatest strengths.
Other frameworks (e.g. Seam) are more suitedr to create a very large web application with lots of reusable components and complicated pageflows but the learning curve is much steeper. So for me Click works well for small to medium sized websites.
It's an apache incubator project but that does not mean the project is not stable, rather it reflects that it is in transition to the Apache project model.
Click is Apache's version of a component based web framework equivalent to JSF (other component base Java Frameworks are Tapestry and Wicket)
Click is rated at Ohloh
There is an official blog and some Wikipedia references: Framework Comparision and info page
I am evaluating Rich Internet application solutions to use in next project. I have heard of following solutions -
Adobe Flex
extJS
Jboss Richfaces
IceFaces
Oracle ADF
JavaFX
Silverlight
GWT
I want to know if there are more solutions available.
I would appreciate if you can provide any valuable feedback on the above solutions.
IT Mill Toolkit is a "server-driven" framework built on top of GWT.
Comment: coming from a heavy PHP and Java-hostile background, I found Toolkit to be very pleasing to use pretty quickly. Being able to write nothing but (the strongly typed, nicely OO-oriented) Java is nice, considering the fact that what you change in the code is pretty instantially reflected on what you see in the browser.
It's a bit tricky to set up, but IT Mill has an Eclipse plugin that supposedly helps with that. The only thing is that the plugin itself is a tad unintuitive to use :)
0.02€
Reply to comment: The biggest difference between GWT and IMT is that GWT operates entirely inside the browser (a hostile/exploitable environment with e.g. FireBug), while IMT uses GWT only to render the server-side state. So, while you can edit any values you want in the browser with both GWT and IMT, GWT will happily accept the user-edited variable values, IMT keeps track on the values server-side, and doesn't allow any discrepancies between the client and server.
Another big difference is that GWT widgets need to be compiled every time you do any changes to them with the relatively time consuming GWT cross-compiler (compiles Java to JavaScript). IMT, on the other hand, needs only to be redeployed to the servlet container, and the changes are there, because the GWT widgets inside IMT don't need to be recompiled. With Tomcat, it's virtually instantaneous (i.e. as soon as Tomcat notices that Eclipse has recompiled the classes on the fly).
#the_drow: Not being familiar with Dijit, here's an answer: Dojo is javascript only, meaning it's client side only. Vaadin (née IT Mill Toolkit) lives partly in the server side too (calls itself "server driven"), so you can't hack the client side just by changing JavaScript variable values. There's a chart that compares Vaadin with other comparable products. Dojo isn't included, but JQuery is, which is vaguely similar to Dojo
i had an experience with Spring Webflow + Rich Faces with mixed results - time to get the results on screen is really short, but it's pain to fine tune the presentation part.
ie if you are building some tech oriented/backend
/standard GUIs - it's ok, if you are going to build a frontend used by millions web2.0-ers you end up messing with presentation part css/javascript big time.
After evaluating and reading various RIA solutions, I have finally selected GWT and GWT-Ext. I see these benefits for me and my team -
We are used to Eclipse so this is an advantage.
Ability to use Java Debugger in Eclipse is extremely helpful.
GWT Hosted mode in eclipse, so no compile and deploy required on every change.
Big developer community
Lots of ready to use components
Prior Java knowledge helpful
Similar to swing and the team have worked on Swing in earlier project.
Look and feel is also good
Maven support is also available.
Can write Junit test cases.
No other language knowledge required apart from Java.
Easy RPC configuration based on annotations.