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 7 years ago.
Improve this question
I am building a web based RIA application using web technologies including Rails based server side code, and client side based on HTML,CSS,JQuery and plugins etc.
I am looking forward to creating a standalone cross platform application using the same code-base (I do not want to rewrite the application UI in Qt or some other language/library).
Also, I dont want that clients should have to set up a web server to view the content. The application is heavily ajax based and communicates with the restful backend. The desktop client should be able to have exactly the same functionality with additional provision of local storage and synchronization of data.
I wish to carry out the entire development process on linux. Now that Adobe has stopped supporting AIR on linux, I am not taking that as a viable candidate.
I have been looking into Mozilla prism, its almost what I am looking for, except for the fact that it does not seem to have any provision for local storage or interaction with local filesystem.
It would be preferable if the solution is open source. My entire codebase from bottom up is based on open source technologies and as far as possible I would like to keep it that way.
Also, I am comfortable hand-coding my application and features like, integration with existing IDEs, GUI development environment, powerful application builder wizards etc. are not necessary requirements.
I have been suggested that it is possible to have a webkit component embedded in a Qt application and carry out what I want, but I am unable to locate proper resources that can help me do that. I am familiar with Java and C plus plus, so writing additional wrapper code in some other language is not a major hurdle.
If somehow local storage facility can be added to prism, that would be a highly preferred solution.
Also creating a plugin for google-chrome/chromium is a possible alternative. How does it compare to above options.
Any help would be highly appreciated.
At the moment AppJS ( http://appjs.org ) seems to be the most robust contender designed exactly around these same principles.
Another alternative might be a GTK-webkit based solution ( http://webkitgtk.org ) .
[Update:Aug 2013]
Multiple other alternatives are available as well :
TideSDK
TideSDK is community based offshoot of the immensely popular Titanium SDK. While the project is very promising, last I checked there were major hiccups running the developer tools on linux.
Node-webkit
This interesting project provides seamless interoperability between Node.js and Webkit. The end result is that you can start developing an application just like you would write a web-page with the additional ability to call any built-in or third-party node-modules. CommonJS modules just work in the browser context. The project is intel sponsored and I have personally found it very simple to use and productive.
Related
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 1 year ago.
Improve this question
I want to make an app were users can buy different products. I don't want that the app runs in the browser. That's why I would user a native or a hybrid app. The Shop has a lot of products with a lot of images and I want that the images were load from a web storage in the app.
Is this possible with an native app or should I use a hybrid? Or it is even possible?
Which programming language do I need for a hybrid app?
Native vs Hybrid App debate is a one which varies its outcome based on your priorities. You should always go for whatever best suits your needs. Some points to consider while choosing to go with Native or Hybrid are,
Development Time -
The foremost pointer to consider while Native vs Hybrid comparison is that the code is written individually for both Android and iOS platforms due to their technical variations in the former approach.
Whereas in case of Hybrid, a single code is written for both the platforms by the same developers which means you can build Hybrid apps for Android and iOS using the same codes.
Mobile App Cost -
As per the top mobile app development companies, app development with Hybrid approach can reduce the cost by 30%-35% when compared to that of Native app development for the same app project.
UI/UX Experience/Performance -
Even though Hybrid apps have caught up with their Native counter parts in terms of performance, Native apps still deliver a much better experience and also provide a good long term stability.
API and Third Party Library Support -
When it comes to API accessibility, the Native app development frameworks can use all the types of APIs directly. Whereas, the same is not possible in the case of Hybrid technology.
Now answering your specific queries, Image caching is available in both Native as well as Hybrid Apps and shouldn't be something you need to worry about too much.
You can go with either React Native or Flutter for building Hybrid Apps. React Native uses good old Javascript for development and Flutter uses a new language called Dart. Even though both are quite popular development frameworks, which one to choose is another debate in itself as both have their pros and cons.
Personally speaking, If I was building an eCommerce App, I would probably go with React Native.
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
The last couple of days I began to teach myself how to create a Website from scratch.
I bought a webspace and fooled around with html, css and javascript and when I wanted to build a online chess game I learned about Node.js
But I don't understand what Node.js is used for because the documentation shows how to install and create a fresh server(!) with Node.js and handle requests.
Do I don't have to use a apache installation on my server anymore?
Do I create the whole website and all it's pages with Node.js like the index or about page?
If I use Node.js just for a web application, how can I add the web app to an already existing Apache website's page?
I think I really got confused and need some help to understand Node.js better since so many are using it.
Do I don't have to use a apache installation on my server anymore?
Correct. You create your whole web server in node.js. You generally don't use or need Apache with it.
Do I create the whole website and all it's pages with Node.js like the index or about page?
Yes, you create the whole web server in node.js and use it to serve all your web pages. Typically one might use a number of libraries with node.js such as Express for mapping all the routes in your web app and your favorite template engine to help with filling in data in HTML pages before serving them to the client. At very high scale, one might consider using some other infrastructure (like nginx) to offload static resources from your node.js server to increase scalability, but that is not necessary at small or medium scale as node.js scales really well.
If I use Node.js just for a web application, how can I add the web app to an already existing Apache website's page?
You can run one of the two web servers on a different port and have two web servers that are part of your web-site liking to each as needed. But, typically you would move everything you currently have in Apache over to your node.js app. You don't have to do that, but most people wouldn't start out with an objective to build a web-site out of both node.js and Apache.
One thing to keep in mind is that node.js/Express are conceptually a bit different from Apache in how you build a simple web-site. A node.js/Express web server serves NO content at all by default. So, you don't just drop a directory hierarchy of web pages on your node.js server and expect it to serve those pages by default. You can do that pretty easily with express.static() (a feature of the Express library) if that's part of your site design, but you have to consciously configure that in node.js (it takes just two lines of code to do so).
If you want to write a "simple" chess game, you're best bet is to start learning Canvas. This tutorial by the Mozilla Foundation is one I personally used and enjoyed a lot. If you want the computer to play as CPU opponent, then you would likely need to use a server(node.js!).
You can use Node.js to build a simple website, but that would be like using a screwdriver as a hammer. Node.js is used for making desktop apps and for programming servers. Servers(backend) analyze user inputs and provide some sort of feedback. Let's use StackOverflow as an example. The frontend(HTML, CSS, Javascript) is what you see. All of that is done in the browser. The way you get that code to someone's computer so they can render your website is via a server. Servers do other cool things. When you do a search on a website or save a post, the server is dealing with storing that data or finding you the right results. If you want to build an API, like the one used for Google maps, or for Yahoo Finance, you'd use a server.
If you want to make your own server using Node.js, I'd recommend using Digital Ocean or Heroku. They are beginner-friendly and are respected in the industry. Heroku is free and owned by Salesforce if that makes a difference. However, this is unnecessary, for beginners. I recommend using a free or low-cost hosting platform that deals with that for you.
The thing about Node.js is you can use it to create websites via template engines, but I wouldn't recommend that. You are essentially writing server-side javascript to create HTML. That's foolish most of the time when you can just write the HTML itself. Just have node.js deploy it.
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 5 years ago.
Improve this question
Recently, I have been reading about Electron and I got curious about its potential when compared to something already established in the market of building Windows 7 desktop applications (i.e., WPF).
So far, I noticed that those who lean towards Electron discuss the fact that it provides:
fast-development cycles: one familiar with HTML5, CSS3, JS, and some Node.js, is all set to jump right into building a desktop application.
cross-platform compatibility: being based on Chromium and Node.js, both cross-platform, the application can run anywhere where these two are supported.
beautiful and interactive GUI design: the combination of HTML5, CSS3 and JS has proven what is capable of achieving over the years.
straightforward and cost-effective web recycling: a web application can be relatively easy converted to a desktop application by the same developers who created it in the first place (i.e., saving costs).
When it comes to WPF, its supporters discuss the following favoring arguments:
access to native APIs: WPF fits well into the .NET framework giving the developer access to all native Windows functionality.
powerful XAML markup language: it is argued that the XAML allows efficient rendering of sophisticated UI elements, supports two-way data binding, and knowing it may be useful in other contexts (i.e., with appropriate adjustments, e.g., Android development).
high-performance and memory-efficiency: mainly due to the compiled nature of the language and, perhaps, other JIT idiosyncrasies.
If we take these arguments separately, we can agree that both technologies are respectable. However, when you ask developers for help choosing the right framework for your the project, things get a bit biased. I assume that the bias may be either because the questions are too unspecific, or because some are more familiar with one framework than the other and, thus, the comfort zone kicks in.
Hence, keeping in mind that both are just means to an end, and not life philosophies, when compared, it usually boils down to the following ideas. Please note that these are not my ideas, but what I collected from various discussion groups around the web.
DOM manipulation is an expensive operation, whereas XAML rendering is blazingly fast.
Electron gives you access to just a few native OS functionality through its APIs, whereas WPF gives you access to all since it lives on the .NET.
Electron is slower compared to WPF because JS is interpreted, whereas, say C#, is compiled.
WPF works well with the MVVM pattern, whereas something similar is harder to achieve in Electron.
Electron is fast to get started with, whereas WPF has a steep learning curve (but it looks more professional they say).
Electron is cross-platform, whereas WPF is tied to the .NET. Not sure whether the Xamarin/ .NET Core was taken into account.
Electron application size is large as it has to ship with Chromium and Node.js to accomplish its goals.
WPF is less actively improved compared to Electron (i.e., Electron is an open-source project).
Electron handles the application updates for you, whereas the same thing requires more work in WPF.
On one side, it seems that software engineers (i.e., especially those who work in the corporate world) tend to favor WPF. On the other side, web developers are excited about what Electron brings to the table. In my opinion, this is bias, and the fact that you work more with a technology than the other does not say anything about how suitable the technology is in itself.
Therefore, to avoid this bias and, perhaps, other nagging answers, I want to provide you with the following case study.
Let us say one is interested in building a Windows 7 desktop application with Electron. The goal of the application is to allow the users to configure and run an extremely computational-intensive statistical analysis on a large XLSX file (i.e., 1e5 rows). In short, the user fills in a form, a special syntax file is generated (i.e., json, xml, or txt), the application reads that file and performs the analysis with the parameters specified there. At the end, a pdf file with graphs and tables is provided to the user. Now, let us assume the following about this project:
the DOM is not directly manipulated. Rather, Vue.js or React are used because they implement a virtual DOM which is faster.
the application does not need access to all the native OS functionality. The application only requires to read/ write files to disk and, perhaps, send some notifications.
because JS is too slow to run the statistical analysis, a C++-based Node.js addon is written and called from JS. Behind the scenes, the C++ code constructs the objects and makes the computations. At the end, the resulting matrices and vectors are be exposed to the JS.
the developer cares to structure the application properly and separates the concerns as much as possible. To avoid unnecessary renderings, Vue.js or React components may be used.
the developer does not consider problematic the additional ~50MB in size added to the package by the Chromium and Node.js.
the application is hosted on a central repository and the updates are pushed to the end users.
Keeping these assumptions in mind, my questions to you are:
To what extent is a WPF application more efficient than an Electron application, given that the heavy computations are implemented in C++ or C# and packaged as a .dll? If it is, what causes these differences?
Is XAML more efficient for rendering interactive UI elements compared to Vue.js or React in combination with HTML5 and CSS3?
Disclaimer: I am bias towards Electron because I think it enables me to build the GUI faster than XAML. I may be wrong because I am not entirely familiar with what XAML has to offer.
Note: Please do not mark this question as inappropriate. It is specific enough and well documented, and it might help others facing the same decision.
Edit 1. Please provide arguments for downvoting/ flagging the question for closing. Perhaps, if you offer some constructive feedback the question can be improved.
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'm a newbie developing a small web application that uses HTML, JavaScript (Angular 1.5.0) & CSS. I am using Grunt to process, jslint, minify my javascript and CSS files. This front-end communicates via HTTP Rest calls to a Django application that is also running locally (which has its own database)
This webapp currently lives only on my laptop (MacBook Pro) and I use the PyCharm IDE to edit the files. When I want to test out the app, I simply go to http://localhost:63342/myapp/index.html#. PyCharm's built-in webserver serves it up for me and I can play with it there.
However, I want to allow a select few people to also access the webapp from other locations on the internet. When they try to access http://MyPublicIpAddress:63342/myapp/index.html, they get connection denied.
What is the quickest/easiest/simplest way I can share my webapp with those other people? I do not know much about setting up and configuring Webservers, so if you can give me the simple/easy instructions (or point me to a doc!) that would be most appreciated.
I posted this question to the PyCharm community forum here, but got no response.
Edit
Many answers say I need hosting service. Yes, If I want to deploy my website to a fixed IP address. But is there no way to simply allow them to briefly visit my webapp while temporarily running a toy web-server on my laptop? This is not a long-term solution I understand. But just to give them a peek. If possible I would like to avoid the effort and learning-curve involved in pushing it to a hosting service. I would have to setup the back-end API, database, etc (which are all currently running locally)
There's many services that allow you to host your project online.
For small projects
CodePen: http://codepen.io/
Plunker: http://plnkr.co/
kodeWeave: http://kodeweave.sourceforge.net/
For large projects
Cloud9IDE: https://c9.io/
Koding: http://koding.com/
Github: https://pages.github.com/
Sourceforge: https://sourceforge.net/
Heroku: https://www.heroku.com/
BTW: kodeWeave is my project. It uses Github Gists to save and retrieve your weaves online, thus is not actually saved on the site plus it's a very reliable host when it comes to small projects like it is. (Inspiration from Dabblet.)
It's being made kind of as a JSFiddle alternative for mobile devices, except without all the http requests.
It has many libraries built in (Such as JQuery, Angular, Font Awesome, etc:) in addition when you export as a zip file you will get all those libraries (Hence the except without all the http requests comment). You can also export your weave as a Windows, Linux, Mac, Chrome Application, and/or as a Chrome popup extension.
You can watch this video I made that explains how to use kodeWeave for desktop exportation.
I've listed services I use and recommend. I will not list something I haven't tried without warning.
If you have a spare laptop you can use that as a web server. I've never done it myself because it's not worth the this for me. However something you may want to look into
Lastly you can read Creating a Local Server Configuration with PyCharm which maybe the option you're looking for.
Use localtunnel to expose your localhost- https://github.com/localtunnel/localtunnel
You need hosting, or try codepen.io for small project.
Change the configuration in PyCharm to host at 0.0.0.0. You will also need to port forward your router... I would strongly suggest not using this as any sort of long, medium or short term solution.
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
As we all know, JavaScript is widespread on the web. For client side scripting it does a great job.
But is it possible to take JavaScript outside the browser? For example, writing a streaming socket or writing DB, doing schedule job? Things like that in the backend? Thanks.
Yes, you can do a lot of backend things in Javascript.
There is a lot of frameworks and application that runs Javascript as a backend, all with different pros and cons.
NodeJs
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
OPA
Opa is an advanced application framework for JavaScript. All aspects are directly written in Opa: Frontend code, backend code, database queries and configuration. And everything is strongly statically typed.
CommonJs
The CommonJS API will fill that gap by defining APIs that handle many common application needs, ultimately providing a standard library as rich as those of Python, Ruby and Java. The intention is that an application developer will be able to write an application using the CommonJS APIs and then run that application across different JavaScript interpreters and host environments.
Vertx.io
Vert.x is the framework for the next generation of asynchronous, effortlessly scalable, concurrent applications.
Vert.x is an event driven application framework that runs on the JVM - a run-time with real concurrency and unrivalled performance. Vert.x then exposes the API in Ruby, Java, Groovy, JavaScript and Python. So you choose what language you want to use. Scala and Clojure support is on the roadmap too.
Have a look at node.js. It does a certain number of things very well, but may not be best suited for all purposes.
If you are looking to do stuff that involves a lot of parallell processes and/or you want to keep persistent connections open to and from a user's browser, then it may be perfect.
Along with node.js, have a look at vert.x.
This site is written by node.js
Using websvr, it's Java style have filter and handlers.
Never used it , but for server-side JS the most populate framework is nodejs http://nodejs.org
Yes, you can utilize JavaScript outside the browser. Both for server-side scripting (similar to JSP or ASP). This can most notably be accomplished using Node.js (http://www.commonjs.org/) however there are other options available. Similarly you can create aps entirely outside of the webspace using the CommonJS API (http://www.commonjs.org/).
Check out the Wikipedia article about JavaScript (http://en.wikipedia.org/wiki/JavaScript#Server-side_JavaScript).