I'm starting to develop a browser-based game (and by this I mean text-based, no Flash or similar stuff on it) and I'm struggling to decide on which development framework to use.
As far as requirements are concerned, the most important thing that I can think of right now is the ability to translate it to several languages. A good object-relational mapping and a way to generate forms from logical objects would also be very good, as I've noticed that I always spend lots of time solving the problems that come up when I change any of those things.
The programming language is kind of unimportant. I have some experience in PHP and C#, but I don't mind, and I would even like to use this as an excuse, learning some new thing like Python or Ruby. What I do want is something with a good and thriving community and lots of samples and tutorials online to help me.
I would reccomend sticking to what you know - PHP is more than capable.
That's true of course, but:
I don't mind, and I would even like to use this as an excuse, learning some new thing like Python or Ruby.
Then writing a browser game is an excellent opportunity to do this. Learning something new is never wrong and learning an alternative to PHP can never hurt (eh, Jeff?). While neither Ruby on Rails nor Django are especially useful for writing games, they're still great. We had to write a small browser game in a matter of weeks for a project once and Rails worked charms. On the other hand, all successful browser games have enormous work loads and if you want to scale well you either have to get good hardware and load balancing or you need a non-interpreted framework (sorry, guys!).
I'd definitely suggest PHP. I've developed browser based games (pbbgs) for about 10 years now. I've tried .Net, Perl and Java.
All of them worked, but by far PHP was the best because:
Speed with which you can develop (that might be due to experience)
Ease/Cost of finding a host for a game site
Flexibility to change/revamp on the fly (game programming seems to always have a different development cycle then normal projects)
Ruby is not to bad, but the last time I tried it I rapidly ran into scaling/performance issues. I have not tried Python yet...maybe it's time to give it a shot.
Just my two cents, but over the years PHP has saved me a ton of time.
I would reccomend sticking to what you know - PHP is more than capable.
I used to play a game called Hyperiums - a text based browser game like yours - which is created using Java (it's web-based quivalent is JSP?) and servlets. It works fairly well (it has had downtime issues but those were more related to it's running on a pretty crap server).
As for which framework to use - why not create your own? Spend a good amount of time pre-coding deciding how you're going to handle various things - such as langauge support: you could use a phrase system or seperate langauge-specific templates. Third party frameworks are probably better tested than one you make but they're not created for a specific purpose, they're created for a wide range of purposes.
Check out django-mmo!
Related
I'm using codeigniter for a little time and I find it really good, but sometimes it's difficult to find pre-cooked examples on the web that will guide me on what I want to do...so my question is which web framework(independent of language) will offer more examples, better tutorials and more resources in general?thanks in advance
Have a look at this wikipedia comparison of frameworks to see what they support out of the box (resources).
As to user base / documentation / useful examples: it depends on code that you can easily read as well. Have a look at:
http://static.raibledesigns.com/repository/presentations/WebFrameworksOfTheFuture-FlexGWTRailsAndGrails.pdf and https://equinox.dev.java.net/framework-comparison/WebFrameworks.pdf also compare frameworks.
I personally use the MS family, and I am satisfied.
I would strongly recommend CakePHP , it has alot of examples and really nice documentation.
It has a very nice way in handling models relationships
I'd recommend you have a look at the following, categorized in no particular order, with their language of implementation and support in brackets. They all present rather clean and novative aspects, but I don't think there's any real silver bullets. Just lots of very nice bullets depending on what you aim for.
The Laureates are...
Lift (Scala, Java)
Play (Scala, Java)
SeaSide (Smalltalk)
Ruby on Rails (Ruby)
Grails (Groovy, Java)
Yii (PHP)
Wicket (Java)
Others
There are other ones, but these were the ones that struck me a blow the first time I saw and experimented with them, and which have - in my opinion - brought some innovation to the scene in general or to their platform in particular.
Note that this isn't to say that some other frameworks may have been equally significant, but I merely list relatively recent and modern ones, and most importantly ones that I will still consider to write a modern web-app (in the general case).
Feel free to look around for more (and maybe add them in comments or edit this answer).
A few notes...
Play is indeed fun to poke around. Yii is the only PHP framework I'd touch with a very long pole (maybe CodeIgniter as well, granted, but I find Yii cooler and less of a hurdle to use and to work through). Rails/Grails are obviously on par. Wicket is something you'd want to consider if you are in a Java shop that's relatively restrictive and doesn't want anything ultra-exotic, but still enough on the edge.
But mostly, I'd recommend you have a look at Lift and Seaside, if you want to see something truly amazingly well thoughout and for the highest feature-per-LOC ratio. (Oh, and it's inspired partly by Seaside and Wicket, and designed by someone who had to work with a lot of (g)rails web-apps, so that sums it up. Plus Scala is an amazing language, granted you can use it and its underlying platform...)
This is an old question, but what the hell, Just came across it...
I've decided to get some experience working on some project this summer.
Due to local demand on market I would prefer to learn Java (Standard and Enterprise Editions).
But I can't even to conjecture what kind of project to do. Recently I had some ideas about C. With C I could to contribute to huge Linux projects. I don't mean that my work will be surely commited. I could get the code and practice with it. But C it's not right thing to get good job in my area. In case of JavaSE there is a chance to develop some desktop applications. But thinking about JavaEE I get stuck. I'll be very thankful for answers.
CodingBat.com will give you good core Java practice.
Project Euler is still the best for all around practice. You can use whatever language you'd like to solve the problems there.
For actual projects, I almost always start on something easy like a Twitter client. It gets you exposure to all the basics along with UI and network communication. You can work up from there. Just don't start with something so overwhelming that you can't figure it out and want to give up. That's not going to get you anywhere.
The best advice is: work on a project that you have personal interest in. Something based on your hobbies, maybe.
If that doesn't work, make a blogging / CMS engine. Or an online photo album. Or an eStore. The world doesn't really need another of any of these things, but it will give you some good practical experience with JavaEE.
Another benefit of "re-inventing the wheel" (for learning) is that you have probably already used systems like these described above, and you have a good idea of how it can work, and maybe you have your own ideas of how it could work better. That can make requirements much simpler, and also will give you a sort of benchmark so you can see how close you can come to building a tool like the "real" ones out there. And if yours is really great, well, maybe release it and see what happens. ;)
There are many Java-based projects on SourceForge. Tinker with one you find interesting.
I've implemented either a betting pool or a Baccarat game in almost every language I've
learned.
This type of software covers:
Dates and times, with calculations
Currency types and things that can be converted to and from currency.
A discrete set of rules that is easy to test
States, transition between states and multiple entities responsible for state transition
Multiple users with different views of the same model End conditions
Multiple player blackjack and poker would work also.
One caveat is that in my day job I work on financial systems and there is a huge overlap
between things to consider when writing a multiplayer game of chance and a trading system.
build an address book. the concept is simple, so you're not stuck on "what" to write. You can focus on learning your chosen language. You get experience in working with a database, java ( insert any language here), and UI design.
when you decide to learn another language you can create the same thing. Since the database has been created already, you can focus on the language itself.
the concept of inputting data, storing data, and retrieving data is central to a lot of applications.
Have a look around http://openhatch.org/ for a project that sounds interesting.
I'm having a bit of an overload of information these past two days.
I'm planning to start my own website that will allow local businesses to list their items on sale, and then users can come in and search for "Abercrombie t-shirt" and the stores that sell them will be listed.
It's a neat little project I'm really excited for and I'm sure it'll take off, but I'm having problems from the get go.
Sure I could use ASP.Net for it, I'm a bit familiar with it and the IDE for ASP.Net pages is bar-none, but I feel this is a great chance for me to learn something new to branch out a bit and not regurgitate .NET like a robot.
I've been looking and asking around but it's all just noise and I can't make an educated decision.
Can you help me choose a framework/platform that will make me learn something that's a nice thing to know in the job market, but also nice for me to grow as a professional?
So far I've looked at:
Ruby on Rails
Kohana
CakePHP
CodeIgniter
Symfony
But they are all very esoteric to me, and I have trouble even finding out which IDE to use to that will let me use auto-complete for the proprietary keywords/methods.
Thank you for your time.
Have you considered ASP.NET MVC?
You will learn MVC architecture and client-side programming with javascript and jQuery, in a nimble platform that produces clean markup. If you are used to ASP.NET, you will be surprised at the clarity of design.
The NerdDinner tutorial is the go-to guide for getting started.
I suggest you try the whole Java eco-system.
Both similar and different to the .NET world, a lot of open-source frameworks.
Eclipse is a very good free IDE.
Also, why not go with GWT for the client side ?
In any case - enjoy !
Because nobody's mentioned it yet, I'm gonna have to suggest Rails.
I'm sure you're going to hear arguments for each framework you mentioned (and probably some you didn't), but I"ll be brief and explain why I got into Rails, having tried several of the others in your list:
It's beautiful. Coding in Ruby actually makes me happy. I find that I'm removed from a lot of tedium I've come to associate with large projects, and it's totally changed my coding career - I would literally hate to think how much less content of a programmer I'd be had I not taken the plunge. My only suggestion here would be to just try it.
Besides the succinctness of Ruby, Rails got me thinking in a more modular, logical and maintainable manner. As well as the great community, I really subscribe to the principles Rails stands for (especially the emphasis on DRY code), but all of the frameworks you mentioned have their recognized (and controversially disputed) pros and cons.
Each one is both similar and unique in varying degrees and aspects, and ultimately it's up to you to decide - Do some research; deliberate as to whether you're looking for huge libraries, a strong community, cutting-edge updates or assurances in tight documentation. Figuring out what you hope to gain from a framework is a great way of choosing the right one. But you should go for Rails anyway ;P
Good luck!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am just dipping my hands into web technologies. I started with HTML and now JavaScript and PHP. I have a variety of questions in my mind. I am a hardcore .NET Windows developer and earn my living with it. But now I want to go deep into Web and so here are my queries:
(1) I started using PHP. I also want to learn Ruby with Rails. Can I learn both side-by-side?
(2) What type of sample projects I can develop to learn well these technologies? I just have in mind to make a web log, that it.
(3) I am using Aptana Studio 2009. It is very good but not the best IDE. Which other IDE can speed up my design time? Any tool that separates the design with business logic automatically?
(4) What other things I must learn to bring myself to the front in web technologies?
Firstly, I applaud the initiative in learning Web technologies. Frankly, going forward, I think programmers will increasingly find it harder to not know Web stuff.
To answer your questions:
I would advise sticking to one at least for awhile. I'd suggest that one be PHP. Why? Ruby on Rails is a language and a framework. I'm a strong advocate of people having some understanding of the underlying technologies, including HTTP, before they throw frameworks on top of it that may confuse or hide issues a developer needs to know about. Stick with vanilla PHP and don't confuse it by throwing something like CodeIgniter, Kohana, Symfony, CakePHP or Zend on top of it;
A blog is a fine learner project. Whatever you pick shouldn't be something terribly complicated, something you can get something out of relatively quickly and something you should be able to add features you want to (you'll be more interested this way);
Jetbrains new Web IDE is coming along nicely. It's what I've switched to. PhpEd, Eclipse PDT and Netbeans all have different merits;
HTMl, CSS and Javascript. Additionally I'd also recommend jQuery.
1) Yes. But it is advisable to pick one technology/web framework and master it. It is easy to get caught in the technology rat race.
2) Think of a problem you have been facing say at workplace. Perhaps there is some routine work that can be done better using a web application. Use that as a project.
4) Read up on basic design principles like layout, color etc. The Non-Designer's design book is a good place to start.
1). I personally would advise you go with Ruby, Java or .NET but stick to one whilst learning, preferably the one closest to he language you know already, which for you means .NET (C#?). I wouldn't recommend PHP under any circumstances but plenty would.
2). Yes, a blog is a good starter project.
3). Just get yourself a good text editor for starters. IDEs make a hash of HTML/CSS/JS which is what you'll be doing a lot of too. But you can stay on the free side by getting a copy of Visual Web Developer Express Edition.
4). Get seriously aware of HTTP, HTML, CSS + JS. In fact don't even think about dynamic pages until you have static pages down solid. Then add dynamic functionality.
Addendum:
From my experience of colleagues who have taken the path you're taking, desktop development teaches you a number of bad habits for web development that you're going to need to unlearn. Specifically: assumptions about state, client vs server, concurrency, and - both most and least serious - inline styling. Bad. Bad. Bad.
A solid understanding of HTTP helps clear some of those, and learning CSS (as an effective way of learning the value of separation of concerns) helps with the latter. Concurrency is something most frameworks will take you 90% of the way with but it's always going to be up to you to think about when and how to apply it.
Given further thought I would ultimately recommend you stay in .NET land (the ASP.NET pipeline model and C# as a whole are solid and mind-blowing respectively) and get yourself express and download ASP.NET MVC extensions for it - the WebForms model is pretty widely reviled by web developers for a reason, but coming from a desktop background it might be more immediate for you. At the expense of settling you into those bad habits I mentioned.
Yes if you're dedicated. If your php is stronger than your RoR familiarity there's a book for you # http://railsforphp.com/ - I would recommend getting more familiar with PHP then jumping to RoR as it's a bit more to learn because of the whole MVC architecture and the language itself is different from most semicolon and braces C-style languages.
The hello world of web programming - a blog.
Personally I use VIM which isn't an IDE, but it's pretty friggin efficient for text editing.
I would recommend often reading Stackoverflow and try to answer some questions while you're learning some new technology, it'll double the rate at which you'll learn if you really force yourself.
You can. I think I would advise
against it.
Blogs are good
places to start. Maybe a photo
gallery?
Eclipse is nice for all
sorts of development.
Like Nike
says, "Just do it" :)
1) This depends on your learning capability, but you really shouldn't. Start with either one, get good at it, then the second one will be much easier to learn.
2) As said before, blogs are a great way to start. You also want to create something like a shopping system to get the grip on good database development.
3) You don't want to create Business Logic alongside the UI. Try learning about templating engines such as Smarty, and your problem will likely vanish instantly. Try Eclipse for an IDE, or better, learn about vim.
4) Discipline. It is incredibly easy to shoot yourself in the foot using PHP and Ruby using crappy code. Dot your is and remember to initialize your variables. Don't just copy code from somewhere, but think of what it does and what could go wrong. Sanitize user input. This takes work, but saves headaches later on.
1) Dont you will just confuse yourself. Learn one after the other both are good!
2) Amazon and Wikipedia are largly php based, I know of a couple of airline booking systems, most blogs are based on one of several freely available php applications.
3) For php/javascript/css I have always gotten by quite happily with good old vim, but thats just me. I would beware of any "framemaker" type GUI html editors as they tend to generate a lot of confusing and unreadable html. Its alright for a static page but when you generate a dynamic page you really need to know what all the html tags are there for.
4) If your serious you really need to learn about cascading style sheets and how to use them properly.
(1) It is all about what you want to do and are you OK with handling new technologies. You can do anything.
(2) What about hello world or simple login application if you are beginner really.
(3) Eclipse always a Best option to think.
(4) CSS, JavaScript, and new JavaScript frame work like prototype,jQuery and more importantly some of the tag library.
We are building a RESTful API for our company, which will provide XML, JSON, and potentially other content types.
My team is looking to find a framework which is (In order of priority):
Well Documented
Ideally with good tutorials, and a thriving community and knowledgebase
Follows rational design patterns
Mostly we want consistency in the framework. Naming conventions that don't change based upon which method call you're calling.
Secure
Focused on forcing the developer to perform some form of validation of the GET, POST, PUT and DELETE Variables
Stable
Part of this is maturity, in the sense that the framework isn't changing too often
The other part is a well documented bug list which isn't scarily huge
Scalable/Performance Oriented
We have over 50K users who require significant high availability all around the world. IF our App goes down, people do not have internet in their home. So it's a highly critical environment.
Ideally we could launch the same codebase on 10 servers and just keep adding loadbalancers. We don't want to have to define which server is on which methods....
Integrates well with a Linux/MySQL Environment
We don't have a single MS server. We're not changing that. Sorry .Net fans :-D
I realize this a nebulous goal. There will not be any one framework that meets all of these needs, in fact there will probably be many that meet them in varying ways, shapes and forms.
This is language independent. We already have experience in PHP, but we also have developers who have never written a web application in their life, so learning Python or Ruby or Java is acceptable.
I'll go out on a limb here and suggest Ruby with Sinatra.
Why?
Sinatra isn't "well documented" but is "documented well". Considering that it is much more simple than other frameworks there needn't be quite so much documentation, and since it is built on Rack as a webserver it shares some common documentation with that. But what you need to know is on the website, and it's well written and contains no errors that I've found (IE, it's all up to date).
Most of what you need to know is in the Sinatra Book, the Readme, and the FAQ. Despite the work-in-progress nature of the book its contents are very much accurate and useful. And, if you are still stuck with questions, drop by the IRC chat room freenode.net#sinatra.
Sinatra is capable of being used in a functional/route-based logic method, or by overriding the Sinatra::Application object. You can use either, split your logic and methods into various files, or keep it all in one. It's all up to you.
Sinatra is, of itself, secure. You MUST validate all variables sent by the user, because aside from parsing them and passing them to you, Sinatra doesn't care how valid it is. Therefore, you either enforce validity of your variables or you regret it. ;-)
Sinatra hasn't changed a bunch in the last four months, but it certainly has had maintenance and minor updates. In addition, I've not found the bug list to be large or threatening. It's got virtually everything I need already to build my apps with.
Sinatra doesn't have to be deployed with Passenger, but can easily be custom tailored to be fast. If you use things like Enterprise Ruby and Thin you could proxy to either Nginix or LightHTTPd. If you took two servers you could make one the primary (with the proxy and a number of threads) and the second the database server (with MySQL and a number of threads) and let them loose. This way the tasks are spread across the servers. It'll give you more control than I think Passenger would. (Not to mention better performance.)
I find Passenger (on Dreamhost) to give relatively poor performance when compared against running threads by either Rack, Mongrel, or Thin. That said, once loaded the applications are responsive even in that environment. If I were to predict it, you'd not have a problem with scaling the application as you'd simply have to redeploy your code and restart the threads–nothing that can't be put into Capistrano.
Ruby on Linux is fast and isn't a problem to implement. MySQL with Ruby is easy enough, and there are several really good ORM packages available like ActiveRecord and Sequel. Sinatra won't make you choose one that you hate.
In addition to the answers to your questions, I have a few more reasons.
Sinatra has an easy learning curve, and is very easy to pick up. The biggest problem I had was getting it onto my Dreamhost server since Rack was an older version, but with a vendored version of Rack the problem vanished. If I could, I'd rewrite my latest Rails project in Sinatra with ActiveRecord so as to make maintenance easy upon myself; too much effort was spent in it already.
Thanks to its ease of use and ease of learning, I have found myself more productive in Sinatra without code generators than in Rails with all the code generators. And that's saying something.
Sinatra supports middleware for Rack, and is therefore very flexible in what you can do with it.
If I were to average out the helpfulness of the Sinatra community, on IRC, I'd say that they're more knowledgeable about the framework than the average Rails user–just as a cursory comparison. The reason being that Rails is more accessible to newbies and people who just have no business programming.
Sinatra will support Ruby 1.9. I'm still not entirely certain just how much support for 1.9 there is currently in Sinatra, but I do know they were initially waiting on Rack. As of April 25 this is no longer an issue, so presumably Sinatra is already prepared for 1.9; I know for a fact 1.9 support is in the pipeline for mid 2009, but I don't know how long that will be.
Assuming you can get Sinatra working with Ruby 1.9 with a little effort (version 0.9.2 already supports Rack 1.0, and by proxy 1.9 in Rack's code), before the public 1.0 with support for 1.9, your performance on the Ruby side would be stellar. Even if you cannot, then Enterprise Ruby would help the speed.
Both Django and Rails come pretty close to fitting most of your criteria, except I think that Django's documentation is way better than that of Ruby on Rails'; the documentation for Django is nothing short of amazing (and I'm not being hyperbolic here).
I don't know about the scalability of Django, though. I know Rails scales pretty well (up to a point), but I don't know if the same can be said of Django. (I'm not saying it can't; I'm just saying that I honestly don't know, as I've never written a large application using Django.)
Django also has a pony, in case you secretly desire that, too.
Well. Scalability is nothing easy to get. For Google-like response times, you need something like MapReduce. Ok. Don't kid yourself, super-scalability is nothing for beginners.
As for all the other points, Seaside is clearly best. As for security, check out seaside.st to see why it is inherently more secure than all the other frameworks I am aware of (including Rails and Seam, e.g.). Seaside is reasonably well-documented, but also looking at the internals of seaside is so easy and convenient, that hardly a question remains open for the community to answer, which it does fast usually. Seaside has been stable for many years now, so I think you'll be fine with that.
As for Performance oriented: Run the commercial Seaside, GLASS, and you will get stunning performance compared to a LAMP-like setup, due to the much faster database solution that is integrated, and the framework which trades memory for speed and gets a lot of speed.
Seaside is architectured so well that many people find writing Seaside apps easier than desktop applications. Try it out, you'll love it.
PS: For the record, Seaside is not RESTful.
You can have a look at Django, Python framwork.
It's a very well documented framework, it has an automatic CRUD administrator interface on database and it has also a free book online, that of course you can buy for real :)
Try them all to find out the correct answer!
Well, the people who will be suggesting 'one framework to rule them all' won't have tried them all either!
I guess if there were such a framework, it would be one and only.
For PHP, I've loved the Zend framework (though, to me it is not really a framework). One of it's best features is that each component is independent of the others... So if there is some part of it you don't like, just don't use it. Also, you mention JSON... Zend fully supports JSON in both directions....
Ruby on Rails is vastly documented with loads of plugins and has been tested in scalability already ( see BaseCamp and other solutions made in rails)
Looking at your list of priorities it's hard to say that any one route is the "right" way to go. On the PHP side I've spent a significant amount of time with CakePHP which accomplishes much of what you looking for. But being a guy who hates PHP I would suggest steering clear of anything in that realm.
It's all about style and experience. I've used Ruby On Rails, which isn't the most elegant of languages but it does the job exceptionally well. It hadn't matured as much as using a Spring/Hibernate stack on Java or using .Net which handles almost everything straight out of the box, but it does the job exceptionally well. I prefer the Java/.Net based projects because it fits much better with the way I like to program.
There is no "right" answer, just lots of good ones. ASP.Net MVC for example is a good choice. Forever ago I used Spring on Java which was also fairly effective at accomplishing the job. Even PHP is not a wrong choice. Ruby On Rails, which I have only done two projects with, is very easy to pick up and it makes some rather complicated tasks in other languages fairly simple.
I think that for sheer volume of documentation you can't beat J2EE. It's also believed to be insanely scalable and stable.
Now, from there to really being desirable....
If you're considering Java I would recommend Jersey, it works great and I think it reaches all you 5 goals...
If Java is in your toolkit, look at Stripes.
Rock stable, enthusiastic, though no a spectacularly large community. Good docs, some out of date granted, but the system is so stable even the "old stuff" is relevant. A real nice, recent (late last year) book. Stripes is small enough that the book can, and does, "cover everything".
It's an action framework, doesn't do much in the presentation area (save for forms, mostly, and it has a completely optional templating/layout facility). You can use JSP or FreeMarker, or, really, anything else. It can also do web services (though not as well as something like Jersey).
It is back end agnostic, but there is a JPA integration project for it.
Finally, you can leverage, if you like, all of the other Java/Java EE kit if you want. Since Stripes doesn't consume the entire stack, you have a lot of flexibility to pick and choose the parts you want. Full boat Java EE, Transactions, Session Beans, JMS. Works with Spring (it is "conscious" of Spring and has good integration) JPA, iBatis, Hibernate, raw JDBC, Lucene, JSR-170 Content Repository, whatever.
It's a great piece of kit.
For a 2014 answer, I would recommend Laravel/Slim Framework (PHP), Ruby on Rails/Sinatra (Ruby), Django/Flask (Python), Grails (Groovy, JVM-based language), Play! Framework (Java/Scala) or Sails.js/Kraken.js (Javascript).
Where the first framework mentioned is a bit larger and the second is a bit smaller for the languages where I mention 2 frameworks with the use of a "/".
I hope this helps people that have similar questions 5 years later.
Try cppcms
it is a high performance Web Development Framework