Can standard JS libraries be used in Vue.js/React? [closed] - javascript

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.

Related

React redux application folder structure [closed]

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 4 years ago.
Improve this question
I understand the concept of a react/redux app.
My question is, is there a preferred way to layout the folder structure and files.
After doing much research of repos online it appears that everyone does it slightly differently depending on their code flavor.
Angular on the other hand appears that there is a set structure.
Is this what makes react more powerful as you can tweak and adjust as your needs change?
Has the community agreed on any set patterns?
As you said yourself; 'Everyone does it slightly differently'. It can help to give some resources right?
I don't know how much experience you currently have with React. I personally started with a traditional structure that made use of the dumb / smart component pattern, in which I created a src/redux folder. Within that I had an actions + reducers folder. This works fine for smaller applications.
I changed that approach after learning about the Redux Ducks pattern, which removes a lot of boilerplate and copy-pasting reducers.
I'm currently using this structure.
My suggestion is to try different approaches and see what works best. It depends on how you and your colleagues work in general. For example - if you know that everyone uses their CMD+P to search for specific files, you'd prefer being more explicit in file names, instead of having an actions/posts.js and reducers/posts.js file you'd prefer creating postsActions.js and postsReducers.js instead. I'd suggest reading these two Medium posts aswell, as inspiration:
My journey toward a maintainable project structure for React/Redux
How to better organize your React applications?
Edit on 31 july 18:
Seeing as a lot of people still read this comment and upvote it. I would like to recommend that if you're starting to work on a medium to large project, I would definitely try and get some knowledge about TypeScript and React. I've completely migrated to TypeScript as it makes it a lot easier to step back into a project after a while due to typings, interfaces, generics, and it being more strict. It greatly helps for your overview of the project. Several downsides of it is that you have to learn the typings of the React library and how to use this. TypeSearch greatly helps to see if there are typings available for a specific library. Also some patterns like higher order components can be awkward in TypeScript due to typings at first.

How to best analyze and understand the .sln file I've been given? [closed]

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
I've been handed off a rather complex web app from a prior developer with whom I have no way of communicating going forward. My experience in development is still beginner, and I need to determine the best way to wrap my head around what is going on with this app.
I've been given the full .sln file. I am very comfortable with the basics of navigating Visual Studio. I was trained in C#, but this app contains several additional components that I'm still learning (js extensions, cshtml files). I know the answer is to learn what I don't know, but I'm under a tight time constraint for my employer. What I mainly want to be able to do to start is be able to get to the underlying code of any given functionality within the UI of the web app, e.g. there is a button called "Perform a Test Run" - as simple as it should be to navigate to the underlying code that is run when that button is clicked, I can not seem to locate it. It's certainly not where I expect it to be for the way I was taught.
I tried an app called NDepend to run an analysis but that wasn't helpful to me, unfortunately.
Can anyone suggest a tool or an approach for me to start understanding how this all works together? There are almost no developer comments within any of the code.
I don't know if this helpful, but here is a screenshot of the top-level of the solution to see what different kinds of components are included. The 2nd image is the Scripts folder expanded.
This solution is for an ASP.NET MVC project. The files you are not familiar with (.js, .cshtml) are very common and frequently used file extensions for MVC projects.
".js" files are Javascript files
".cshtml" files are files that are html and/or Razor syntax.
The good news is, ASP.NET MVC is one of the best ways of making web applications currently, and learning it is fairly straight forward and not too daunting. Especially if you say you have familiarity with the concept of MVC.
I will direct you to a few key resources:
This is Microsoft's MVC portal with tutorials and documentation
This is a great Pluralsight course on some MVC5 fundamentals

What are the main differences between AngularJS and ReactJS [closed]

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...

Is angularjs a good fit for large datacentric enterprise web application [closed]

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 trying to build a web application which will have many different pages. each page mainly shows data in table and various graphs based on data.
I want to decouple front end completely from the backend. for this reason I am considering angularjs.
My concern is following two points:
angular js is considered best for SPA style applications
angularjs will load the partial view when required and will load data through ajax, every page needs at least two seperate http requests to render the page.
Is it really a good choice to select angular or any better approach?
I think that using Angular is a good solution, I am working in a very big project, that manage a lot of data and angular is working perfectly.
There are a lot of advantages of using Angular. However, I think that it depends on your needs, if you don't need a rich experience of user, maybe you can select other option different from a SPA that could be faster, if you don’t have experience developing a SPA..
I think that in your case, it is most important choosing well the backend technology than the frontend technology, because the responsibility of managing the data is from the backend.
I hope that helps.
Angular JS is a good for these kind of applications.
1.) Angular JS simplifies your code.
2.) It builds on HTML so you don't have to learn something entirely new and it is fast to catch up.
3.) It has a large community so you can get help on topics easily.
4.) It is continuously evolving.
5.) It is based on MVC structure.
P.S: Read on dirty checking part of angular as it is considered best in some scenarios and not so good in others. It is considered to keep no. of objects to 1000 or less while using angular for good performance.
Hope that helps! :)
From my experience I would say yes, is good. But maybe you can see with your eyes some case studies and applications built with angular: builtwith.angularjs.org.
Check this blog post also: Building large apps with AngularJS.

Are there any good design practices or standards for JavaScript development? [closed]

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 6 years ago.
Improve this question
When developing with object-oriented languages like Java or C#, it's not uncommon for developers to use design tools like UML to make class diagrams, create interfaces, define major components and interactions, outline an API, etc., before beginning the implementation.
I know for most small JavaScript applications, these software engineering principles may be overkill, but if you're developing a library (jQuery, YUI) or creating a large application (Gmail, Google Docs), it's a good idea to create a design and plan ahead before you start writing any code.
Are there any similar practices used in JavaScript development or web development in general?
Edit:
Just to clarify, I'm not interested in creating classes/interfaces or making UML for JavaScript. JavaScript is a different paradigm from the likes of Java/C# and therefore needs different design tools. I'm interested in knowing what those JavaScript design tools/practices are, if any.
Maybe this question better asks what I'd like to know: If a company like Google created a large web application and had several dozen team members create it, what processes, documents, and practices would such a team use to successfully create, collaborate, and solidify a design? What tools (e.g., UML, flow charts, scribbled notes on a piece of paper) would they use to work on and share the design of the application (without writing a single line of code)?
I'm a fan of the Google Javascript Style Guide:
https://google.github.io/styleguide/javascriptguide.xml
I think the answer depends largely on which libraries, if any, you are using client side.
Jquery code looks very different from Sencha or Sproutcore code, for example. In Sencha and Sproutcore, the framework provides you with a 'class' system for developing components, so these frameworks lend themselves to the canonical forms of design patterns.
Also note that javascript is very different then Java or C#. You can impose an interface type system on your code, but many would argue that you are killing the javascript dynamic-language awesomeness if you do.
That said, its always good to have a plan. If you can stay DRY by extending JS objects, then I think you should. And it always makes sense to put some high level design in place.

Categories

Resources