Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am newbie with client-side JavaScript. In one web project, I found about angularjs and use some basic on this. Should I learn jQuery or just use Angularjs for other project?
While learning AngularJS it is best not to include jQuery. Please note that I'm talking about the learning process here, not saying that you shouldn't use jQuery in your final project.
The philosophies and approaches of both libraries to UI construction (declarative AngularJS and imperative jQuery) are so different that you need to somehow unlearn many of the jQuery habits to get most of the AngularJS.
Leaving out jQuery during the learning process will "force" you to embrace the AngularJS way. When you've got full grasp of AngularJS you can start introducing jQuery in directives only.
For the broader discussion of the topic see "Thinking in AngularJS" if I have a jQuery background? but in short:
Start learning AngularJS without including jQuery.
You can get along fine with angular.js without using jQuery if you stick to it's core features.
If you want to include third party libraries in your project most of them use jQuery nowadays so you will get in touch with it one way or another.
Note that this situation "improves" as the angular folks are constantly porting those libraries to angular. E.g. bootstrap is ported in the angular-ui bootstrap project to native angular.js (http://angular-ui.github.io/bootstrap/).
One remaining issue is, that jQuery takes a lot of effort in supporting older browser version which angular.js does not. So while original bootstrap supports ie8 angular-ui's team decided not to.
My advice would be: start with plain angular.js and if the need for third party components arises decide if it's worth for you to include additional complexity with jQuery.
EDIT: Here is described how angular interacts with jQuery: AngularJS DOM selector
Angular can use jQuery if it's present in your app when the application is being bootstrapped. If jQuery is not present in your script path, Angular falls back to its own implementation of the subset of jQuery that we call jQLite.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Without Vue/React I "developed" applications in Vanilla Javascript. There I used some libraries to reuse code from others. Take chart.js as an example: I used it to plot a chart in an election application.
Bootstrap, for example, has a package that is specific to Vue or React. What are the benefits of an specific "library" to the framework?
Applications that don't have specific packages
Now, let's see chart.js: out of my research I haven't found a specific package to Vue.js. How can I use it if so? What about CSS wrappers like Primer and Fomantic-ui? Can I do the same thing as in static applications?
Sorry if this is confuse somehow. If necessary, please ask me for clarification in the comments.
I think any UI library is mostly concerned with the framework specific way of handling things like view updates, rendering, and styling. The frameworks have different concepts regarding those things and therefore individual libs are often necessary to utilize a frameworks ability. When something is being rendered differences in the frameworks have to be taken into account. Therefore you often see library versions for each FE-framework
On the other side, Javascript will always work and therefore a library which bundles functionality (e.g. moment, lodash) can be used in every framework in usually the same way.
If you want to share UI components I strongly recommend using web components which solve framework specific problems like styling as a web standard. You can use them with every framework (e.g Ionic).
In conclusion: JS libraries which aren't concerned with rendering can usually be reused. When it comes to UI libraries, like bootstrap as you mentioned, components often have to be written for each framework. Web components can be a solution because they work with every framework as well as vanilla JS.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have developed an application using javascript,php,html with a lot of ajax calls . I was planning to convert this entire application to angular 7. Is it possible to do this without re-doing the entire application from scratch in angular ?
If this is possible,could you please tell me how to get started with this?
Thank you
No. It's always better to rewrite the entire application. But the effort you put to that will be worth it. You can start by creating a new angular application and adding your code module by module
It is a manual process and you would have to re-do it from scratch.
There are many examples online: Here is one
As Angular is a complete framework and not just a library, it has it's very own concepts. So even if you might be able to "squeeze" some of your javascript code into the angular application, it wouldn't be a clean solution.
One example would be how you access DOM elements in javascript and angular: the javascript approach with getElementById() etc. works, but it's not the way recommended by angular. (Example: document.getElementById replacement in angular4 / typescript?)
So like other answers already suggest, a mostly automatic conversion is not possible. But you can still transform your existing concept and ideas of you current app to a new angular app.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
As I'm a new web developer with initial knowledge of HTML, CSS and Javascript; how do I get started to design a responsive website both for desktop and mobile?
Please suggest me documents/tutorials/guides etc. or frameworks which are helpful for development of mobile responsive websites.
You can use Bootstrap
Bootstrap is the most popular and powerful front-end (HTML, CSS, and JS) framework for faster and easier responsive web development.
Website: getbootstrap.com
Reference: w3schools.com
Reference: tutorialrepublic.com
Reference: sitepoint.com
If you're looking for a php framework, then I suggest you to go for laravel documentation. It has built in bootstrap classes for a responsive web design.
It is OOP framework which has a artisan command line that helps you create migrations to your database and there is eloquent ORM, so you can use any database which also prevents sql injections. Also it is based on the symphony. It has predefined authentication and you can define your urls within the routes with authentication. Composer, standard autoloading, namespacing, dependency injection allow us to mix and match packages with no hassle. Laravel can make good use of powerful and tested third party libraries without having to reinvent the wheel and rewriting something which already exists. There are many services provided.
Last but not the least, the documentation has almost everything but still if you find difficulty then there are these awesome tutorials at laracasts. laracasts- Its kinda like Netflix for developers.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I need to create a web site which will be converted to a mobile application (What I want to build is more suited to be a web site than an application so the building itself should be as a website).
Since I'm more familiar with the desktop and Android native dev world, I got very little knowledge of web client side development. After reading a little I've decided to use these technologies for the client side: HTML5, CSS3, Bootstrap, React.js
The problem is that I've read that Angular is actually a full MVC framework while React has some more specific roles and it's like comparing a car (Angular) to an engine (React). I have already seen comparisons regarding how to do some actions with both technologies like hello world and event handling and stuff like that so I don't need to know how to specific things like what they show in some comparison websites.
So my question is what is the difference between what I can accomplish with Angular compared to React? If I use React, are there going to be things I wouldn't be able to do? When should I use one over the other? If I use React, will I still be able to build a fully operational client side?
I would like to emphasize I don't want a personal opinion. I just want the facts regarding client development and to know what I can and can't do with them.
AngularJS is a full framework like you said, which is designed to write single page applications (SPA) using the MVC design.
On the other hand, ReactJS is consider to be for the development of the View only, or in other words, UI components.
In my opinion Angular is rather complex to learn while React is relatively a small library, but React is faster for its virtual DOM (It doesn't manipulate the DOM directly unless needed).
Also react can be used with other libraries for things like routing while angular already have it.
I think you can build the same website using both techologies, even though React is for UI, it still can have logic and big websites are built with it (Instagram and Facebook for example).
I think the main difference between Angular and React is the fact that Angular is using 2 way data binding, while React is using one way. Maybe this article will make the things clearer for you: https://www.airpair.com/angularjs/posts/angular-vs-react-the-tie-breaker
p.s. I really don't understand why this question is downvoted...
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
We want to create a single page application with php as backend language. Which javascript framework would be a suitable one to develop this?
This question is too subjective and probably going to get flagged. Based on my recent experience trying to convert a yii app to angular frontend, this is my two cents..
Yii is great framework but as soon as you start adding intermediate to advanced Javascript and ajax functionality things start breaking down in unexpected ways, especially with IE and other older browsers, it becomes more even complicated if you are using lot of Yii extensions for popular jquery/js plugins. This is perhaps because Yii's internal JS functions are not really configurable especially with widgets both Yii's and third party.
A single page app using AngularJS/Yii does not really require Yii. If you are using angularJS then almost all data is passed via JSON. Essentially Yii becomes an API engine. Yii is bit heavy for an API only scenario. There are much simpler frameworks which are built specifically for APIs .
Having said that you should perhaps consider using this combination if you are comfortable with Yii do not really want to learn a new backend framework, or have an existing project in Yii which you want to convert to AngularJS.
There is project template for using along with BackboneJS for single page applications you can check it out here https://github.com/clevertech/YiiBackboneBoilerplate
It will give you some idea on how to integrate a Javascript framework with Yii