Using both libraries will make my life easier. But there seem to be some sort of a problem. Anyone knows the solution to this? Thank you.
I agree with Dimitar, use one framework where you can, it will make life much easier. Mootools has a raft of goodies that you can plug in and get going with. I suggest you have a look at the clientcide site http://www.clientcide.com/ and their download page where you will find Tips.Pointy which will do just what you want.
http://www.clientcide.com/js
So you know Mootools has done alot of work to allow it to run side by side with other frameworks but any plugins written for them have to use these new features for it to all play nice. All of clientcide's code has been re-written to allow it to use these new "play nice" features in Moo.
Enjoy
you can make a non-prototypial library co-exist with mootools or prototype (for example, jquery) but you can't easily get libraries that change / extend the native prototypes to co-exist with each other.
chances are you can get things going if you namespace but any code that you have that depends on the first framework that you load may stop working as expected (prototypes again)
as far as i remember, there were some efforts in the past to get this going - there was a project called SmoothGallery or something.
my advice is - find a tooltip plugin for mootools and drop prototip. forcing two frameworks on your users is a bad practice anyway
good luck :)
Related
I'm trying to find useful tutorials about how to create modern websites that loads content without refreshing the page.
I have tried all kinds of words in Google, but I don't get any useful hits. Perhaps it's because I'm not sure what I should be searching for.
Tips and links to tutorials would be appreciated!
Thanks!
tl;dr: Googling ajax website tutorial or jquery address tutorial is a good start.
As has been noted, the key here is AJAX.
AJAX alone, however, is not the answer.
It's pivotal to a non-page-reload site, but there are also a lot of other things to consider.
Luckily for us all, the Internet is great, and lots of developers have an open-source is awesome mindset.
Suffice to say, this type of site has been done before, and there are people out there who have made developing a site like this easier.
Ignoring the back-end & server-side setup, the way I would recommend starting a site like this is to use the following:
HTML5 BoilerPlate
jQuery
jQuery Address plugin.
Use the plugin from the start; from experience, it's difficult to implement it after you've completed the site.
You'll want use ajax. There are also ways to poll the server for updates as well. You can use a setInterval call to periodically retrieve a URL; but this is only required if you're polling. If you're doing this action based on a user event, you can just use that to trigger the retrieval/update. I'd suggest looking at jQuery, it'll make this kind stuff much easier.
jQuery Ajax would make it possible in a simpler way!
There are frameworks built exactly for this. One of today's hot ones is Meteor.js.
Read about it. Worst case, you'll get your googling keywords and find an alternative you like.
I've pretty much set my mind on using CreateJS to create an HTML5 game, but I also came across H5CGB, a boilerplate created specifically for creating HTML5 canvas games. It looks very thorough and I believe the developer when he says it would save me heaps of time writing code I would have had to write anyway.
However, looking at tutorials for both CreateJS and H5CGB, they seem to conflict quite a bit, at least in terms of how these specific tutorials implement their respective tools:
http://hub.tutsplus.com/tutorials/learn-createjs-by-building-an-html5-pong-game--active-11845
http://icecreamyou.github.io/HTML5-Canvas-Game-Boilerplate/docs/#!/guide/walkthrough
I'm basically just trying to understand how to integrate these two systems. For example, both come with their own preloader utility, so I'm not sure which to use and if they would cause issues or if it's just a redundancy resulting in unnecessarily longer loading times.
Has anyone had any experience working with these two tools together?
I believe you should probably just stick to using createJS because the two frameworks do have a lot of overlapping functionality. It wouldn't make sense to use both.
I think you should also check out other game specific frameworks like Crafty.js and possibly watch Google I/O Canvas to get a good idea on the total range of your options!
Crafty
http://craftyjs.com/
Google I/O
http://blog.sethladd.com/2011/05/source-code-slides-and-video-for-html5.html
Hope this helps and good luck learning canvas!
Shalom
I created H5CGB. (Just found this question today via the newly-released Github traffic stats.)
The biggest two reasons to use H5CGB are:
You do not have to learn any new APIs to start developing. H5CGB provides a bunch of scaffolding you can use to skip the boring stuff, but you won't get into trouble if you want to implement any part of your app yourself, and you probably can get going immediately just by editing main.js without even reading the documentation.
The code base is intended to be boilerplate, so you can use all the utilities and scaffolding H5CGB provides as a starting point and edit it if you want things to work differently.
This is in contrast to most other canvas libraries, which tend to be monolithic black boxes of no-touchiness with sparsely documented APIs.
I want to start a project and I am evaluating the architecture.
And now I am at point to decide the front end components.
I want to use HTML5 + Css3 + Javascript
On Javascript side I don't know what do you recommend. YUI or Backbone. I don't know how to evaluate what can be the best for me. The idea is to create a Browser web app and a Mobile app.
Do you recommend another framework for do that? Or some book, url or something that expose how to organize my front end?
This might be a bit late. But I will say this. I've looked through these so far:
Angular, Knockout, Backbone, YUI
And I read some other comments on Ember.
From what I've seen, Angular and Knockout take the same starting approach. They start out telling you how to interface with the front end. I do NOT like this. They give you a whole lot of rope to hang yourself with if you don't know how to design good architecture. Its completely up to you to build a proper MVC app with them.
From what I've seen of YUI, its EXTREMELY similar to Backbone, which is no surprise because YUI was INSPIRED by Backbone. I have spent a LOT of time looking at backbone and I'm very impressed with it. If you follow its principles and standards, it will encourage you to build a sound framework that won't leave you hanging later.
But I saw another commentor who actually actually moved from Backbone to YUI because he said YUI is more streamlined and all around better. I wouldn't be surprised if this is true. But I need to evaluate it further.
Many folks, including myself, agree that Ember, Knockback, and Angular are rather "heavy handed" in their approach. Like I said, they START with explaining how to interface with the HTML. Right out of the gate, they're wanting you to do things a certain way. This could be very problematic depending on your particular application.. OR it could make your particular application a piece of cake if it fits nicely in their approach!
My two cents!
Backbone is great for creating web apps, both for desktop and mobile. It's strongest point is that it's small and quite simple: you can actually read through the entire annotated source code. Backbone helps you structure your code in a maintainable way, which is the main benefit.
The downside of backbone is that it's not very beginner-friendly: setting up the collections, models and views can be quite challenging if you're not used to it. It also doesn't help you at all in rendering the views, which is a blessing and a curse: it's not as easy or helpful as a widget based framework, but it also doesn't get in your way, which is especially important when implementing the mobile app.
I would recommend you study the backbone todo-example ( http://documentcloud.github.com/backbone/#examples-todos ) to get an idea how the framework works.
I plan to start web app development. (Html, Css and Php) I want to make a mafia wars style game for the web. Static graphics game is played using buttons.
Its would really just be a database to store stats and a bunch of buttons.
Would this be too hard for a complete beginner to web development to take on? Would javascript even be necessary for this?
Yes. It would be too hard for a COMPLETE beginner to take on. Where complete beginner = just learning to program. If you have some other background (General CS knowledge, Database experience) then you could probably do it.
JavaScript doesn't sound necessary for what you are describing.
I would suggest going through a couple tutorials on web application development so that you understand the basic concepts, and then decide whether you know enough to start building your game app. Here are a couple tutorials for various development environments:
http://webproject.scottgu.com/CSharp/HelloWorld/HelloWorld.aspx
http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html
http://download-llnw.oracle.com/javaee/1.4/tutorial/doc/WebApp.html
You should probably at least read through some of those to get an idea of what you should know.
Would this be too hard for a complete
beginner to take on?
I don't think so. The game hasn't been developed by a single developer, there is a team of developers behind it. That shouldn't be an issue anyway, however, it won't be that easy for a beginner to take on such website initially unless you have good understanding of various concepts including strong knowledge of the main language, javascript, html, etc.
Would java script even be necessary
for this?
Possibly. Facebook has its own implementation of javascript named FBJS (Facebook JavaScript), it is more or less similar to vanilla javascript. At some stage or the other, javascript is needed to build some dynamic pages and there are certain facebook-related stuff you will need to use javascript (FBJS) for.
JavaScript. Yes. However, it can be done without but it may hurt the game in the long run.
A project for a beginning? It depends how focus the programmer is. If you are using this project to learn, certainly a good place to start. However, if it is for long run serious project, I would reconsider after learning some of the basic of programming.
If you love the idea you have and want to run with it, you will learn a ton in the process. Just don't expect to have a working product in a week. Don't let feature-creep hit too hard either. Odds are you'll end up re-writing it once you have an idea of how the process goes over all. I did something similar a few years back over the course of a month and I was pretty pleased with everything I learned.
You can do it, with patience.
I'm a .NET guy desktop developer, and I love that. I don't really love web development because we lost precious time to debug CSS, javascript, and compatibility stuff instead of creating value.
But I think it's because I had not taken time to learn about good web development practices, so now because I want to become the best developer that I can, I'd like to learn about my weakness.
Can you give me some advices/links/patterns/frameworks to become a good web developer ? (I am a .NET guy so I accept everything that will permit me to develop better websites in .NET).
Thanks !
Precision
I have done a lot of ASP.NET webform in the past, but this is not enough to create great web site without loosing time on compatibility/css/javascript issue.
You could take a shortcut and use ASP.NET, which provides a number of controls to make web development easier - and you'll be familiar using them.
Unfortunately, they aren't really that great (imo) and do not teach you good practices with the web.
I suggest you look into ASP MVC, which is now in beta. This will teach you how to write websites whilst allowing you to use libraries you are familiar with .NET
With general web development, look into websites like W3schools which will teach you the basics.
Remember to seperate presentation from markup with CSS and make sure you are using javascript to add value to a page, but make sure your page is still usable without it.
You will always lose time with CSS compatability issues, all I can say is with practice you learn what pitfalls to avoid so it gets a little easier.
As for javascript development, it has improved considerably in the past few years with frameworks which in theory are cross-browser. Maybe try looking into JQuery which syncs well with ASP MVC and has intellisense in visual studio
Advices:
Best advice I can give to you: Just don`t get angry when you done something correct but it wont show as you wanted. Patience! :)
Links:
www.w3schools.com
Nettuts.com
Webappers.com
Digital Point - webmasters forum
Patterns:
My advice is to get more into MVC pattern and any enterprise pattern.
Frameworks:
Just see this link :) Framework Guide
For Javascript: JQuery,Prototype,Mootools,EXTJs
For CSS: 960 grid system is pretty good
Make sure you learn about the client/browser side as well.
Current best practice with all the different browsers around is to use a javascript library to make your web-application cross platform and cross-browser. An AJAX library like jQuery or Prototype to perform the interactive actions you wouldn't be able to do with standard HTML and CSS in the pre-AJAX era.