I am looking for any examples which ideally cover several possible combinations ( SimpleRepository, ActiveRecord , POCO ) - something similar to Brad Abrams
http://blogs.msdn.com/brada/archive/2009/10/27/index-for-business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update.aspx
but ORM is SubSonic.
Related
What is a fortunes response?
Techempower.com uses them to benchmark Web Frameworks. I'm writing about PHP Frameworks and I would like an easy to understand definition of fortunes responses.
You can find details about the benchmark titled Fortunes on relevant techempower's documentation here. They say:
This test exercises the ORM, database connectivity, dynamic-size
collections, sorting, server-side templates, XSS countermeasures, and
character encoding.
The term fortune that obviously confused you, refers to the database table used in this benchmark:
A Fortune database table contains a dozen Unix-style fortune-cookie
messages.
That refers to fortune, a unix application made for a bit a fun as far as I can tell.
You probably shouldn't worry about any of that when writing about PHP frameworks. That's just the a title they picked for their benchmark.
I have been using Django for many years (since Django 1.2). and in the past, I used different type of web frameworks (such as CakePHP, Rails, ASP.NET MVC, and some other full-stack framework). Django wasn't my first framework.
Different frameworks have differences in their approaches and benefits. There are certain part of those framework I like and I don't. In this context, I'd like to look at the design of Django Framework in more specific.
After transition to Django, I like how it design its framework. When learning a new language (such as Go, Scala, Ruby, Haskell), I try to looks for a framework that has some similarity in its design especially those I mentioned later.
The following are the 2 Django framework design decision that is very different:
it encourage pluggable apps or apps reusability.
Hence:
moving away from monolithic design by Jacob Kaplan-Moss
using multiple apps to create a full feature site, without any model or logic
writing a Project-less Django mentioned in Practical Django Projects by James Bennett
it uses Model View Template instead of classical MVC:
mentioned in FAQ.
view describes which data is presented
template describes how the data is presented
a view normally delegates to a template
controller is probably the framework itself: the machinery that sends a request to the appropriate view, according to the Django URL configuration.
I would not believe that Django pioneer such features. I believed this pattern is very common in Framework Design. Just that I have no idea, what is this (design) pattern called? This concept is very useful to be applied in other framework. I believed knowing the name of the pattern could help me understand or even build a new framework on different language with the same concept.
Currently there are tons of web framework, most of them are following the classic MVC pattern. Some use the concept of plugin to add certain capability. Plugin however solve the reusability in different approach depending on the context.
So I did tried to learn as many framework I could in order to find an alternative framework in different languages. Hoping that I could find out the pattern that Django use. However, it is very difficult for me to learn all of them. In fact, I haven't found one so far.
I have been searching for:
Django like framework in 'ruby'
Django like framework in 'Java'
Django like framework in 'Haskell'
Django like framework in 'Go-Lang'
Django like framework in 'Scala'
Unfortunately, none of them really, highlight the concept that I'm interested in.
In this Q&A, I would like to know what do people call such framework? (Or What pattern is Django use?) Would be good if you could give a references in this design which other framework might have been using it too?
Looking at Django design philosophies
I think they use/combine a lot of different design patterns trying to fulfill the philosophies. It's difficult to map to a single concept.
Tip is to look at Software Design Pattern and it should be possible to identify many patterns are used in django. Many patterns are of course common in other frameworks as well.
For example (patterns more or less used):
modelform_factory maps to "Builder"
QuerySet can be mapped to "Lazy initialization"
The ORM/database mapped to "Adapter"
What is it about django that you cannot do in other languages?
is it the access to the database, or the models? - no, python also has SQLAlchemy; ruby has Active Record...
is it the views, or web framework? - no, you can provide views with Flask, Pyramid, rails, php ...
it is the templating system? - no, you also have Jinja; mustache, Liquid...
is it the admin contrib packages? - no, you have phpmyadmin, workbench ...
is it a set of libraries to make your development easy? a toolkit?
django has great tooling, many packages you can use; it is a platform, meaning it has enough of a core to be the starting point of many projects, and enough community behind it to have many packages to make integration into a turn-key solution a breeze.
django uses the DRY (Don't Repeat Yourself) principle as a design philosophy. From the point of reusability, keeping clear responsibilities for each piece / app makes it easy to reuse components. But that doesn't take a well-designed platform; the emphasis should be on the components that are written in a way to be reused. E.g. generic tagging, configuration / data-driven components...
Django is MVC.
MVC is a pattern not a strict rule frameworks have to apply. The pattern tries to give a commonly accepted solution to a frequent problem. The problem is "How to properly organize a web framework" and the solution is "by separating data, logic and UI" in meaningful modules.
Therefore Django is MVC. Django logically separates those concepts (and many others) in modules. That's what matters IMO. Django view is not the same as MVC view, but... poteto potato...
About app reusability:
Django is The web framework for perfectionists(...) and perfectionists (or simply good developers) write reusable code. This is expressed by Django DRY philosophy and materializes in Django apps.
I'm pretty sure you can design app-like components with other web frameworks. Of course, since apps are in Django's nature since many years, it has much better support!
We are working on billing system (java based module)for that we would like to have a testing framework. That testing framework should be able to adoptable for any type of billing scenarios(eg: utility bill payments, water/electricity/or any other type billing) Normally the billing entity have common attributes like customer name/usage/ etc..I would like to pick a suitable testing platform to test our billing module.
It can be opensource/licensed software.
Can anybody suggest such a framework/engine?
If you wanna go for open source tool, then I'd recommend Selenium Webdriver with TestNG Framework. You can get lot of documentation and help on web.
You can go for Cucumber for describing various test scenarios (and their dependencies).
These scenarios will be backed by jUnit for gluing the description to executable code. jUnit will typically be used to write low level tests as well (for use by developers).
Cucumber has the benefit of giving you reports and can serve well for discussion with users and their representatives.
I would suggest following based on your given little description about your need :
1 - For functionality testing and to make all your scenarios automate use Selenium WebDriver
2 -Then if you want to priorities your testes , want to run tests through XML , want to run multiple tests then you can use TestNG Framework
Above are totally open source tool and you will get real benefit of those by scripting. They allow you to do scripting using programming languages like Java , Python , ruby and a little more. You will get all details once you visit my given links in above 2 points.
According to your given requirements I think above 2 tools are enough to make everything automate for testing.
Lots of languages have microframeworks for writing very tiny websites or web services, such as Flask for Python, or Sinatra for Ruby. On Squeak, there doesn't seem to be any equivalent; Iliad, Seaside, and AIDA are all very heavy for just having a little service. What's the preferred way to accomplish this? Directly injecting a hanlder into Comanche or Swazoo?
"In this particular case, I literally have three URLs that need to do stuff via HTTP POST; that's it."
For really simple cases, you can just register with (or subclass) Kom's HttpService like so (from the class comment, see for more info/options):
(HttpService on: 8080 named: 'Example Http Service')
onRequestDo: [ :httpRequest | SomeGlobal processRequest: httpRequest ];
start
You can also use teapot. Teapot is micro web framework on top of the Zinc HTTP components, that focuses on simplicity and ease of use. It's under 500 lines of code, not counting the tests.
Teapot on
GET: '/hi' -> 'Bonjour!';
GET: '/hi/<user>' -> [:req | 'Hello ', (req at: #user)];
GET: '/say/hi/*' -> (Send message: #greet: to: greeter);
start.
(ZnEasy get: 'http://localhost:1701/hi/user1') entity string. "Hello user1"
There are available mustache templates, output transformers, before filters. The framework is well documented.
I would like to share what I think is more up-to-date information (as of end of 2012).
Zinc Components
Currently in Pharo 1.4/2.0 the de-facto standard for HTTP client/server seems to be the Zinc HTTP Components. And the latest Seaside version (3.0) switched to Zinc as well.
You can of course use Zinc directly to implement web-services or serve web-pages.
Take a look particularly at classes ZnServer and search for classes like Zn*Delegate (like ZnDefaultServerDelegate or ZnStaticFileServerDelegate)
Seaside REST
Latest versions of Seaside include support for RESTful web-services. This can be used to implement web-services or serve web-pages. It's pretty straightforward.
For more information look at the "REST Services" chapter of the online Seaside book. This chapter centers about implementing web-services, but it works for web-pages as well.
Ratpack
I have also been told about Ratpack, a sinatra-like web-framework developed by Tim Felgentreff. There are two repositories. I think the github one is more recent. See here:
http://ss3.gemstone.com/ss/RatPack.html
https://github.com/timfel/ratpack
This information comes from a similar question I posted recently.
You can subclass a SwazooSite in Swazoo for such a micro website, but I think you will soon end needing more functionality, so starting directly on one of those three frameworks are better bet long-term.
That they are heavy is maybe just an impression and lack of better documentation of usage for such simple websites. Also, if you look at the framework as blackbox, which is complex internally but simple externally, then I'd say all Smalltalk web frameworks are quite simple comparing to other web frameworks.
Hi I'm looking for another approach than use Ria Services with silverlight.
We are using Silverlight 4 and .NET 4.0
Have someone make any nice solution with shared assemblies (maybe linked files so domain logic are spread). And maybe any nice framwork to make communicating with the wcf services in a clean way?? It would be really nice if it could support preservereferences :)
I'm looking for links and blogs.
I prefer to not use Ria Services cause its Data Driven mind with need to implemmenting ID's everywhere and lack of support for value objects. I'll also using MVVM so all the logic to undo, notify and so on isn't used.
I would take a look at DevForce by IdeaBlade ( http://www.ideablade.com/ ).
The DevForce product has been around for a number of years and definitely has MVVM support. I looked at it for a project recently and I found the team very helpful. There is an evaluation light edition so you can try before you commit to a purchase.