Can JavaScript be the only language used in a project? [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I started learning JavaScript a while back and it didn't take long for me to realize that JS relies heavily on HTML/CSS (there isn't even a way to get an input from the user using just JS unless you use prompt or HTML).
However, I love the language itself and I was wondering if there is any way to have a project run on JUST JS. (Or if there is another language that's language is as beautiful and simple as JavaScript but still has the practicality of Java or C++. I find Python/Ruby's syntax to be odd, sorry).
I know this isn't the usual question here at Stack Overflow, but I'm somewhat new to this and there's no other clear, definitive answer.

You could look at Node.js. Which is a backend server framework that uses Javascript as the language.
But if you want to display user interface code to browsers, you still can't get away from HTML and Javascript.

If you want to interact with an user in a browser, you must need html, or prompts as you said otherwise the user have nothing to do there :).
And If you are looking a way to execute javascript at server side
Look at, node.js that take advantage of V8 JavaScript Engine
Another option is io.js

With Node.js, you can write a project beyond web.

Related

Python library for parsing code of any language into an AST? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 27 days ago.
Improve this question
I'm looking for a Python library for parsing code into its abstract syntax tree representation. There exists a built-in module, named ast, however, it is only designed for parsing Python code, to my understanding. I'm wondering if there is a similar Python library that suits the same purpose, but works with other programming languages. In particular, I'm looking for one that can parse JavaScript code.
If one does not exist, any direction on how I could get started designing my own?
In general, when you need to parse code written in a language, it’s almost always better to use that language instead.
For parsing JavaScript from Python, you may want to check out this module, which can be installed using pip and should work well enough.
The library tree-sitter has a python binding, tons of language parsers!

Which kind of servers are for VueJS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I know VueJS is a side server rendering (SSR) technology, so, which servers are for this framework? Can you give some examples?
You've got a lot of things mixed up, so I strongly suggest you go through the entire documentation. VueJS is a client-side application framework, like React, Ember, Backbone, etc.
Server-Side Rendering is just one of the features that VueJS comes with, which basically means that a server will pre-generate the HTML with the data prepopulated instead of making the user fetch all its parts and assemble them in the browser (which is way slower, and way worse for SEO). If by "what kind of server" you mean what type of language the SSR compilation runs in, it's Node.JS.
Good luck! There's a lot of terminology.

JS framework for dividing the code into categories [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a JS framework, which would help me to divide the code into categories. Whenever I do any apps, I don't use any framework and even tho it's working, my code looks really untidy, it lacks a nice structure. Can you advise any nicely formatted, object oriented, MVC framework which works well with node.js apps and EJS? (besides express.js)
I recommend TypeScript. If you're not interested in running your code through a compiler, check out this answer:
Constructors in JavaScript objects
... explains how I like to set things up so I can have a general "class" structure and keep different parts of the app in different files.
Express is the most used framework for Node.js
Apart, if you are looking for something similar to the relation ruby - rails which gives you a predefined project structure (controllers, models...) probably you can take a look to yeoman
For an angular + node app I'd go with this particular generator: angular-fullstack

what is the easiest web scraping tool that handles javascripts [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I would like to make a web scraping application that is able to log in to a website (I was able to do this with twill (python)), and also to be able to execute JavaScript which trigger access to other pages.
I would definitely prefer to use something in python, but I am ready to try something new. I have installed mechanize, watir, Hojocki, etc. but not sure if this really helps.
I'd recommend PhantomJS.
It's a full Webkit browser, but headless and scriptable.
It's ideal for this sort of thing.
I believe there are a few modules (such as Ghost), but I have used Selenium/WebDriver for things like this. It is ostensibly a testing framework, but it provides you with a lot of methods to allow you to interact with the page just as if you had loaded it as a normal user. You also have the benefit of running it so that a browser actually opens and you can watch the code execute (makes debugging easier), or in a 'headless' mode where the code just executes (there are other sites/SO answers with much better explanations than I can give :) ).
That being said, Ghost looks great as well, so try them both and hopefully one will get you what you need!
Also, see Javascript (and HTML rendering) engine without a GUI for automation? for a similar question that may have some additional answers.
I would recommend Octoparse, a free web scraper for Windows.
It's not programmble but it's very easy to use. But there's no Mac version.So...
JavaScript can be handled by Octoparse btw.

Python library for rendering HTML and javascript [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there any python module for rendering a HTML page with javascript and get back a DOM object?
I want to parse a page which generates almost all of its content using javascript.
The big complication here is emulating the full browser environment outside of a browser. You can use stand alone javascript interpreters like Rhino and SpiderMonkey to run javascript code but they don't provide a complete browser like environment to full render a web page.
If I needed to solve a problem like this I would first look at how the javascript is rendering the page, it's quite possible it's fetching data via AJAX and using that to render the page. I could then use python libraries like simplejson and httplib2 to directly fetch the data and use that, negating the need to access the DOM object. However, that's only one possible situation, I don't know the exact problem you are solving.
Other options include the selenium one mentioned by Łukasz, some kind of webkit embedded craziness, some kind of IE win32 scripting craziness or, finally, a pyxpcom based solution (with added craziness). All these have the drawback of requiring pretty much a fully running web browser for python to play with, which might not be an option depending on your environment.
You can probably use python-webkit for it. Requires a running glib and GTK, but that's probably less problematic than wrapping the parts of webkit without glib.
I don't know if it does everything you need, but I guess you should give it a try.

Categories