DEV Community

loading...

Discussion on: Where do I start with writing a web page nowadays?

Collapse
trystansa profile image
Trystan

Well, simple HTML/CSS/JS will do the job. No need fancy frameworks such as Vuejs, React and so on.

If you want good visuals, you can go for Bootstrap, it's one of the most popular CSS framework. But I personally prefer Materializecss that is more simple to use from my point of view.

For the Rest API call, you can do this with basic javascript. But you should look for Jquery, it's a small utility script that you plug to your webpages (<script src="jquery.css"></script>). It just provide simplified functions that replace some complicated javascript ones. For example if you want to select a DOM element by it's ID :


//With javascript only
document.getElementByID('myelementid');

//With jquery
$('#myelementid')

You can then use the JQUERY Ajax utility to POST, GET or UPDATE http requests over your REST API back-end server

$.ajax.post({url:"http://myserver/mymethod/"})
.done((successData=>){
  //Success case code//
})
.fail((failure=>){
  //Fail case code//
})

You success case code can then update DOM elements to display your data.

You have the entire W3C school website for clear documentation and examples : w3schools.com/
The Mozilla documentation pages if you want better documentation coverage, but less clear examples : developer.mozilla.org/fr/

Materialize and Jquery also have clear and useful documentation.

Collapse
rmoff profile image
Robin Moffatt Author

Thank you, that’s really helpful πŸ‘πŸ»

Forem Open with the Forem app