Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects. I want Something like this in Nodejs to be able to enforce my clean coding practices in Nodejs projects.
Please do suggest, if you've come across any tools like this in nodejs environment.
I have used dependency-cruiser in a few projects. So far it has been able to fulfill all my needs.
Related
I am learning Node JS. It had almost learnt 70%. I am very interested in Backend Development but I'm not interested in Frontend development. My question is how do I practice my Node Skills. I only know HTML, CSS in Frontend. How can I make projects in Node JS without knowing Frontend? Or do I need to learn frontend frameworks such as React too to make projects.
You can build an API and use postman to make requests. Start with something simple and keep improving by refactoring your code.
You can work on the API creation part but in my opinion, you must learn one frontend framework it will not only increase your skill sets but also help you to coordinate with frontend easily and take more advantage of it than the projects you will build will be more useful and advanced as well.
You could also focus on implementing some algorithms and data structures starting of with simple ones such as LinkedLists, ArrayLists, sorting algorithms and then move on to (binary) trees and graphs.
These will be required for any programming language to solve (complex) problems and there are many books and internet resources for this. Just search for algorithms and data structures and you'll get plenty. You don't need more than a console application with some simple console.log() statements to implement algorithms - no need for fancy UI.
Last but not least, you should certainly have a look at TypeScript if you want to develop more complex backend applications.
If you really want to do Web Development though it is certainly helpful to have a basic understanding of frontend development or know the basics of common frameworks such as React, Vue, Angular or Svelte.
As others have mentioned for API development you could also just use Postman to send requests.
As a junior developer I am struggling to decide which approach should I use for a prototype. Given two separate apps (Java Spring Boot and Angular) I can learn many things from scratch. On the other hand JHipster provides a skeleton and a lot of already working components to copy paste.
So what do you recommend for a junior? Should I jump to JHipster or should I built everything myself in order to conquer the basics? Would it be possible to conquer the basics from a top down approach (JHipster)??
Note: I understand that Jhipster allows the easy integration of other components f.e. provides easy docker support. But still, I am not sure whether this approach is better for someone still on the learning curve.
It depends on the time you have for the prototype and if the result is really important.
Solution 1: if you have a lot of time to learn, you can start from scratch and try to build everything on your own. Then, you use JHipster and can compare what you did with JHipster, and use JHipster as a modele (as we try to keep best practices). You can take some code and integrate it to your project but not sure it will work easily. And you will see there are some parts which are really hard to code yourself as they impact all your project (ex: security)
Solution 2: use directly JHipster and focus on your use cases, using the generated codes of JHipster as example. You will learn with a good base code. And you have a good community on stackoverflow and gitter to help you.
As a JHipster team member, I would suggest the solution 2, of course :-)
I like a lot Cucumber and I find a very useful tool to solve problems seeing them with an outside-in approach so I would like to use it as part of chef projects too. I have successfully integrated it into the project I'm working on but at the time of writing business goal of features I have some doubts.
Who is the end user here?
Regarding on this the feature will be more service oriented or not, ie:
If the feature is more architecture faced the I could write a MongoDB feature which describes that I need up and running a MongoDB service and that the applications is linked to it.
In the other hand I should just write application features, forgetting about the infrastructure behind and then assume that if the cucumber tests run well for the application then it means that the infrastructure is fine too. (I dont like this approach)
Which of the both approaches are better? I like the most the first one but I'm just a noob on these lands. Please give me your considerations.
Our Customers often have Requirements for some small WebProjects, to integrate in our EnterpriseEnviroment. Currently I create those Apps with ASP.NET WebForms or MVC but this Technology often feels a little bit to heavy for this kind of purpose.
I really don´t know much about node.js, only that it scales very well and is good for having a lot of concurrent connections.
So I've asked myself:
Is node.js suitable for small Projects ?
Do I have any advantages for a small Project?
Am I right that it´s more lightweight than ASP.NET WebForms/MVC
How is the node.js support for WindowsServer? Or should I setup a LinuxBox for it?
How is the Database support in node.js ?
Does it support direct DB-Connection to MSSQL-Server?
Or is it better to get my Data from a WebService?
I know that node.js is only server-side and you can´t really compare it 100% with something like ASP.NET WebForms/MVC
Is node.js suitable for small Projects ?
Yes.
Do I have any advantages for a small Project?
Very lightweight, very modular, easy to install.
Am I right that it´s more lightweight than ASP.NET WebForms/MVC
Enormously so.
How is the node.js support for WindowsServer? Or should I setup a LinuxBox for it?
It works OK on Windows. It would probably suffice to install a Linux shell.
How is the Database support in node.js ?
Beautiful.
Does it support direct DB-Connection to MSSQL-Server?
Yes, I believe it does.
Or is it better to get my Data from a WebService?
"Better" is kind of vague, but for a very small project, simplicity is generally the key, so no.
First of all, I have seen this question: How to best create a RESTful API in Node.js and it has pointed me towards mers, which has been a great help.
But I have also been reading a lot of good things about derbyjs and it does look really interesting.
So my questions, does it make sense to use derbyjs for ceating a REST API (real-time features might be useful in the future, but not a 100% certain at this pont.)? And is it any better or worse than mers?
I am really grateful for any help.
Edit:
If anyone is interested, decided now to use sails.js: http://sailsjs.org/
The strength of Derby is that the same views (i.e. rendering templates into HTML) can be executed on the client as well as on the server. So for building a webapp, you won't have to explicitly code a REST API and then use it from the client-side JavaScript, instead you just write your views and Derby does the rest.
So if you're looking into making a REST API only (as your question states) and no HTML, there is no advantage in using Derby. It's the wrong tool for the job.
It depends on what you're looking for exactly. Derby.js is built on top of Express.js which has excellent support for creating a REST API. This also means that anything you can do in Express, you could also do in Derby. If you want real-time features, and the ability to build out a REST API, Derby.js is an excellent choice. It's also one of the reasons that people recommend Derby over something like Meteor (currently Meteor does not have support for REST endpoints, but it will hopefully in the future so also something you might want to keep your eye on, if you're in the market for real-time framework). However, if you're not looking for a node framework with an emphasis on real-time functionality, Derby is not the right choice. I would however recommend looking into Express.js to build a REST API. We use it currently for that purpose and it works really well. There are also a number of libraries and packages that play nicely with Express, so in the future if your needs change, it's easy to find something that works well with Express.
Anyway, I would recommend checking out some basic tutorials for how to create a REST API in Express because once you're able to successfully do that, adding some of the real-time features of Derby.js is fairly straightforward.
Basic tutorial on creating a REST API in Express.
http://coenraets.org/blog/2012/10/creating-a-rest-api-using-node-js-express-and-mongodb/