Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broken link and small improvements #343

Merged
merged 2 commits into from
Sep 27, 2024
Merged

Remove broken link and small improvements #343

merged 2 commits into from
Sep 27, 2024

Conversation

ewan-escience
Copy link
Member

@ewan-escience ewan-escience commented Sep 27, 2024

Changes in this PR

This PR intends to remove all broken links from the JS/TS page (#301) and acts as first step towards having an up to date page (#268). Some typos have been fixed and all links now have https.

The GitHub request template has been updated to use double backticks for the command to check for broken links, as the command itself uses backticks.

Closes #301
Related to #268

Checklist

SIGNIFICANT changes / additions, e.g. new chapters

  • I checked whether the contribution fits in The Turing Way before considering contributing to this Guide.
  • I discussed my contribution in an issue and took into account feedback.

ALL contributions

  • I previewed my changes locally using e.g. python3 -m http.server 4000 and confirmed they work correctly.
  • I checked for broken links, e.g. using the link checker GitHub Action workflow, or locally by using docker run --init -it -v `pwd`:/docs lycheeverse/lychee /docs --config=docs/lychee.toml, at least for the files I changed.
  • My name was added to the CITATION.cff file.

EDIT: this branch should have been prefixed with 301, not 310.

Copy link
Member

@egpbos egpbos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great improvement of the JS/TS chapter, as well as a nice bonus fix to the PR template, thanks!

I leave some suggestions below for you to consider, but I don't consider them blockers for merging this PR. We can also discuss them in a separate issue first and pick them up in a next iteration.


In particular, see the page about [Javascript best practices](http://www.w3.org/community/webed/wiki/JavaScript_best_practices)
Additionally, see the page about [JavaScript best practices](https://www.w3schools.com/js/js_best_practices.asp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Additionally, see the page about [JavaScript best practices](https://www.w3schools.com/js/js_best_practices.asp)
Additionally, see the W3Schools page about [JavaScript best practices](https://www.w3schools.com/js/js_best_practices.asp)


# Frameworks

To develop a web application it is no longer enough to sprinkle some [JQuery](https://jquery.com/) calls on a html page, a JavaScript based front end web application framework must be used. The are very many frameworks, popularity is a good way to pick one.
To develop a web application it is no longer enough to sprinkle some [JQuery](https://jquery.com/) calls on a HTML page, a JavaScript based front end web application framework must be used. There are very many frameworks, popularity is a good way to pick one.
Currently the most popular frameworks are

* [Angular](https://angular.io/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Angular still used (by us or others in research)?

Should we also add Svelte or other SSR frameworks?

Can also do this in a follow-up PR, but just wondering.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning to have a look at frameworks in a future branch.


On Ubuntu (18.04) based systems, you can use the following commands to install NodeJS:
On Ubuntu (18.04) based systems, you can use the following commands to install Node.js:

```shell
# system packages (Ubuntu/Debian)
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this still work after 6 years? That would be amazing!

Could also be updated in another PR, of course.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test this, wanted to look at this in a future branch.

Comment on lines 205 to 208
These are some good TypeScript editors:

* [Atom](http://atom.io) by GitHub, with the ``atom-typescript`` Atom package.
* [Brackets](http://brackets.io/?lang=en) by Adobe
* [WebStorm](https://www.jetbrains.com/webstorm/) by JetBrains
* [Visual Studio Code](https://code.visualstudio.com) by Microsoft
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repetition here feels a bit silly. Suggestion:

Suggested change
These are some good TypeScript editors:
* [Atom](http://atom.io) by GitHub, with the ``atom-typescript`` Atom package.
* [Brackets](http://brackets.io/?lang=en) by Adobe
* [WebStorm](https://www.jetbrains.com/webstorm/) by JetBrains
* [Visual Studio Code](https://code.visualstudio.com) by Microsoft
For editing TypeScript, we recommend the same editors as for JavaScript.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to not commit that suggestion, GitHub was warning me that there's some weirdness going on in selecting these lines in the review window.


## Debugging

In web development, debugging is typically done in the browser.
Typescript can not be run directly in web browser so it must be transpiled to Javascript. To map a breakpoint in the browser to a line in the original Typescript file [source maps](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) are required. Most frameworks have a project build system which generate source maps.
TypeScript cannot be run directly in web browser so it must be transpiled to JavaScript. To map a breakpoint in the browser to a line in the original TypeScript file [source maps](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) are required. Most frameworks have a project build system which generate source maps.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TypeScript cannot be run directly in web browser so it must be transpiled to JavaScript. To map a breakpoint in the browser to a line in the original TypeScript file [source maps](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) are required. Most frameworks have a project build system which generate source maps.
TypeScript cannot be run directly in the web browser so it must be transpiled to JavaScript. To map a breakpoint in the browser to a line in the original TypeScript file [source maps](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) are required. Most frameworks have a project build system which generate source maps.

@ewan-escience
Copy link
Member Author

@egpbos Thanks for the review, I incorporated your suggestions in a new commit. I think this can be merged now, but I don't have the rights to do so.

@egpbos egpbos merged commit ef635b2 into main Sep 27, 2024
1 check passed
@egpbos egpbos deleted the 310-broken-js-links branch September 27, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken links in Javascript/Typescript chapter
2 participants