Git Product home page Git Product logo

machinisteweb / simpleatlas Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 18 KB

Un exemple de structure JavaScript permettant de délivrer ses fonctions par composant et de les exécuter au chargement ou en retour AJAX sans $(document).ready().

Home Page: http://blog.lesieur.name/eviter-les-multiples-jquery-document-ready-dans-vos-pages-web/

License: GNU General Public License v2.0

JavaScript 42.97% HTML 57.03%

simpleatlas's Introduction

SimpleAtlas

Version : 2.0.0

NodeAtlas Version minimale : 2.0.8 ou sans rien.

For an international version of this README.md, see below.

Avant-propos

SinpleAtlas est :

  • Un exemple de structure JavaScript permettant de délivrer ses fonctions par composant et de les exécuter au chargement ou en retour AJAX sans $(document).ready().
  • un exemple de site tournant avec NodeAtlas en tant que simple serveur web.

Il fait office d'exemple pour l'article : Éviter les multiples $(document).ready() dans vos pages web

Tester l'exemple

Pour tester l'exemple, téléchargez les fichiers via Download Zip. Après les avoir dézzipés, vous verrez qu'en testant le fichier site-b.html —en l'ouvrant directement depuis le dossier— vous ne serez pas capable de réellement avoir un retour AJAX. Il ne sera que simuler car vous lirez le fichier en mode file:// et non en mode http://.

Cela ne gène en rien la compréhension de l'exemple mais si vous voulez le tester avec un serveur web vous pouvez le faire avec NodeAtlas.

Tester en mode Simple Serveur Web avec NodeAtlas

Pour tester l'exemple dans de vrais conditions, il vous faudra installer NodeAtlas sur votre poste de développement et vous rendre dans le dossier :

\> cd </path/to/simple-atlas-directory>/

et utilisez la commande :

\> node </path/to/>node-atlas/

Les deux pages seront à :

Note :

Si vous avez déjà un serveur web sur le port 80, utilisez plutôt :

\> node </path/to/>node-atlas/ --httpPort 7777

Les deux pages seront à :


International Version

Overview

SinpleAtlas is :

  • an example of a JavaScript framework for delivering fonctionnality by component and run them in loading of page or after an AJAX request without $(document).ready().
  • an example of website running with NodeAtlas as a simple web server.

It used as an example for the article : Éviter les multiples $(document).ready() dans vos pages web (Fr)

Test the example

To test the example, download files via Download Zip. After having unzip it, you will see that by testing the site-b.html —in opening directly from the folder— you will not be able to actually have an AJAX response. It will just simulate because you read the file in mode file:// and not in http:// mode.

This does not prevents understanding the example, but if you want to test it with a web server you can with NodeAtlas.

Test in Simple Web Server mode with NodeAtlas

To test the example in real environment, you need to install NodeAtlas on your development computer and go to the folder:

\> cd </path/to/simple-atlas-directory>/

and use the command:

\> node </path/to/>node-atlas/

The two pages will be to:

Note :

If you already have a web server on port 80, consider using:

\> node </path/to/>node-atlas/ --httpPort 7777

The two pages will be to:

simpleatlas's People

Contributors

machinisteweb avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nodeatlas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.