/Start your first app with The-M-Project

Start your first app with The-M-Project

 

 
1-Intro:
The-M-Project is an exciting HTML5 JavaScript framework for building cross-browser mobile web applications (IOS, Android, Palm web OS, BlackBerry).It makes use of JQuery on the JavaScript part and contains all UI + core files with features like offline support, internationalization and more.It’s hosted in a git repository . The-M-Project is not alone,it’s required nodeJS, and it comes with a build tool called:Espresso! Espresso makes it easy to structure your code, build and run it on a built-in server.Espresso is hosted on a separate repository on git hub. The-m-project is well-documented and comes with multiple downloadable examples.
 
2-Requirements: Git & nodeJS:
You need to have git and nodeJS installed on your machine. Installing git: http://help.github.com/git-installation-redirect/ Installing nodeJS: http://nodejs.org/#download *If u were a linux user u can only open “ubuntu software center” search for GIT and nodeJS then download them directly.
 
3-Get started using the sample app
a Download espresso from gitHub here: https://github.com/mwaylabs/Espresso
or download the prepacked version here: http://www.the-m-project.org/latest_stable.zip
*I recommend to download directly as it additionally contains all sample apps of The-M-Project.So you don’t have to checkout anything from the  git repository.
bCreate your own directory and place the espresso inside it, don’t forget to add the alias to your bach file. alias=’/path/to/Espresso/bin/espresso.js’
cTo run a sample app -for example the Twitter App- browse to the Twitter sub folder in the sample apps directory.
dThen run : espresso server This will call Espresso to build the app and start the built-in web server. Server running at http://127.0.0.1:8000/Twitter Open your web browser with the URL above and enjoy the Twitter App.
 
4–Create your first app
a- Run : espresso -p -e projectName,this will create a hello world example bBrowse the project subfolder then run : espresso server. cOpen your web browser with the URL and enjoy your first applications.
d Editing your applications
1) To edit your application, open the project folder with an editor of your choice.
2) Open the main.js and find the label ‘Welcome to The M-Project’. Change its value to whatever you want it to say. U can change header and footer values too 😀
3) Now refresh the browser window,Espresso automatically rebuilds the application and your changes can be seen.
More : website : http://www.the-m-project.org/index.html DOC : http://www.the-m-project.org/documentation.html
 

TAGS: