CRUD in Electron - node.js

Could you please give me a piece of advice about how to implement CRUD or DB(PouchDB) modifications using FORMs or any other efficient way in Electron?
The point is I would like whole application to behave as desktop tool and it seems to be possible in Electron. However I cannot determine the best way to do this especially if I would like to add to nice eye-candy tricks to make UX as smooth as possible.

First of all electron is not responsible for the visual appearance of your application. It is a framework which wraps your webapp into a desktop application.
That means you need to use standard web technologies (html/js/css) to create your site including 'eye-candy' and animations.
My suggestion is to do a tutorial which explains how to connect electron with a javascript framework like angular. If this is running you can attach a database and all the hot shizzle afterwards.
This tutorial is very good and well explained:
https://scotch.io/tutorials/creating-desktop-applications-with-angularjs-and-github-electron
enjoy!

Related

MVC practices through Node?

I'm a front-end developer with a desire to learn more on functional programming and template engine processing through JavaScrit.
I'm currently learning the Node platform, which I initiate through Visual Studio Code terminal to build custom JavaScript apps. But I want to take Node further. Does Node provide any good resources on building an MVC (Model View Controller) like applications?
Just to give a little background, I just finished a course in MVC 5 for ASP.NET (which I really enjoyed through Visual Studio 2017), but would like something similar to that which is JavaScript based.
Thanks for any recommended resources! I want to make sure what I am diving into gives me the end goal I am looking for.
Thanks again!
On top of node.js you can use different frameworks, one of the most important is express but there are many others, look at nodeframework.
Then I suggest to use some best practices. Personally I've found really useful the following for express:
https://github.com/i0natan/nodebestpractices#1-project-structure-practices

Has Node JS anything to offer for the UI?

Hope I'm not being to general but: I have been tasked with the job of "rejuvenating/modernizing" a monolithic Java EE (JSF/CDI/EJB/JPA) app. Since the requirements state that it should support multiple clients, I have split up the code in a server (JAX-RS interfaces) and a client part (not yet done)
The server is pretty straightforward but I'm wondering about the UI part. Nowadays (hope I don't sound too oldskool) various Node JS spin-offs seem to be popular but I'm under the impression that they have the most value to offer in the "scalable server" section. Does the various Angular/React/Node framework have anything to offer for the client if you have something more complex than a single page app?
It appears to be a really hard time to pick a UI technology nowadays. Sure, the server/DB part which contains most of the business logic are pretty future-proof but still, one would like to focus on one UI technology. There are various jQuery-based frameworks like Kendo, Vaadin & co etc. One option would be to stick with JSF + ICEfaces/PrimeFaces and just work with the REST interface. And then there is JavaFX which looks nice but the future looks a bit uncertain.
So. If the backend is not going to be Node JS, does Node JS have anything to offer for the UI part that can't be done more easily with other frameworks and does anyone have other insights on the UI layer in general. Predicting is hard, especially the future ;-)
Node.js is a way to run javascript on the server side, not client side. That said, npm (nodes package manager) or its wrappers (like bower) are quite often used to manage the client side dependencies - which is very useful to have.
Angular and react (among others) are client side javascript ui frameworks to help make writing ui much nicer. Neither depend on the backend being written in node.js and can work with any rest api (or other server side apis) - or no api at all if that backend injects all the data the page needs into the page itself.
Electron, which combines NodeJS and Chromium (render Process).
https://electronjs.org/
Formerly known as atom shell it was created by Github, it is the core of the Atom Editor, VS Code, Slack app, and a ton of “thick client” applications. https://en.m.wikipedia.org/wiki/Fat_client
There are several implementations which allow you to use Node.JS modules on a client-side (ie. web browser). You can then use html/css and call Node.JS modules directly from your DOM which is used to implement UI.
I'm most familiar with NW.js which I've used couple of times. Others would be for example Electron or AppJS

What backend can I use to setup breeze properly on a mac?

I would like to develop an AngularJS app with Breeze. I usually use NodeJS with Express but I hear it wont work with Breeze. All the example on breezejs.com use ASP.Net but i am on a mac and you can't run visual studio... What are my options ?
We are releasing a sample later today (in breeze v1.3.0) that shows Breeze talking to an arbitrary web service that could have been written on any platform using any technology.
Obviously, we need more of these examples and as importantly we need to show server side implementations of how one might write these web servivces to best leverage Breeze. But... this is all definitely on our roadmap, and we are actively looking for partners in this process.

Mobile app with Node.js backend - What framework to pick for client-side dev?

I'm planning to build a hybrid mobile app,
I have already progressed pretty well with the server-side using Express 3, and PAssport for authentication.
Now I need to make a decision on what framework or library to use for the clinet-side.
I was wondering if I could get some recommendations and perhaps pros and cons of going with frameworks like
Sencha Touch, JQuery Mobile, Phonegap....
and if there is anyother ones that you think it's worth considering please mention them here,
Thanks for any pointers or advice
JQuery Mobile and Sencha Touch are JavaScript libraries that will let you create an HTML5 application that looks like a native application. Cordova/Phonegap lets you wrap your HTML5 app in native code and provides a common JavaScript API that gives you access to native functionality, like taking a picture with the camera or getting the users Contacts. Another benefit of using Cordova is that it creates native applications for you using the same HTML5 app, so you can publish these files to App stores and increase your distribution. With a JQuery/Sencha Touch only app, you can't distribute on app stores because your hybrid app is simply a website (so, I guess it'd only be a mobile app.)
There are hundreds of blog posts comparing different JavaScript frameworks like Sencha vs jQuery vs Dojo, so you should just go off and do some of that reading. Personally I would suggest Dojo as I think it is the most powerful and enterprise ready framework, but it can have a steep learning curve. One thing I like about Dojo though is the build system, you can pick and choose the modules you want so that you don't have to end up including an enormous .js file like JQuery. I have no idea if jQuery can do this, but a lot of user apps I have seen that use Cordova and JQuery end up including all of jQuery and then jQuery mobile.
If you want to access native device features and/or package the web app as a native app and distribute it on the stores, you should use one of those JavaScript frameworks in combinations with Cordova. (Cordova is the new name for PhoneGap.) Phonegap/Cordova is not really used to build mobile web apps, it's used to extend the capabilities of mobile web apps and allow them to access native device functionality in a completely cross platform way.
Ionic is a new framework available for making hybrid apps that I am liking a lot so far. The framework is built with Sass and AngularJS on top of PhoneGap. Ionic just handles the front end so you still build your app with PhoneGap. I found that since it uses AngularJS your javascript code ends up being a lot cleaner and you will save development time making your app slick compared to what you would have to write with jQuery. It also has some beautiful UI elements. The ionic team has done a lot of speed optimizations with the framework so your app will feel more native than your typical hybrid app built purely with PhoneGap. The framework is still in alpha but I have been impressed with it.

NodeJS Skinning

Is there a module or similar things that support skinning in NodeJS? I want to build a NodeJS website, and want to be able to re-skin the website as I like without much efforts, like in Wordpress.
Is skinning supported in NodeJS?
If you're interested in building a website in Node.js and don't need a wordpress-style cms behind it, there are few projects that can help you out.
Have you looked into Bootstrap? It's built with less which you can easily plug in to your Express setup (see the guide here, using the command line executable to set up a new project you can specify less like this: express --css less myapp and it will do all the work for you)
In the bootstrap less file are several variables you can use to change the colours, fonts, sizes, etc, and it's also got a lot of helpers for grid layouts and responsive designs.
It even includes a few useful javascript plugins too which make the ui nicer with less work.
There are also a lot of sites with themes and theme generators around which then work on top of bootstrap, and may achieve what you want.
Plugging in this sort of solution (whether bootstrap or other) is about as close as you can come to getting skinning for node; As otherwise suggested if you're looking for a CMS out of the box as well, probably best to look for another platform like Wordpress.
Node.js is not a content management system. It is a platform on top of which you could built a web server with a content management system. To answer your question you need to be looking for node.js based content management systems that support themes.
The only node.js CMS that I am aware of is Calipso. It's still pretty alpha-stage. It may have some theming support, but it is nowhere near as polished as Wordpress.
Also is there a reason why you want to use node.js? I mean there is nothing wrong in using Wordpress for creating a themeable website - it is just awesome for that.
If you just want another OnlineShop, or maybe a blog, i think nodejs is maybe not your right choose as Jed Watson told.
If your requirements are more complicated, and you want a quick and easy implementation of a nice web interface, and you have html, javascript, and css knowledge... I strongly recommend you just trying to work with MEAN.js
It puts together MongoDB Expressjs, AngularJs, and NodeJs.
Use this, for example with a yeoman fullstack constructor and you will have a powerful webapp, with user autentication, and much more in a few minutes.
After that, the use of jade, less, scss, and similar languages of modelling the front, and the easy way you can also model collections in the back, is for me the best combination you´ll find for creating a website today.
Hope it´ll help you
King Regards

Resources