can we use couchdb for web application development? - javascript

I was wondering whether we can use java script for application development and use couchdb to serve it. I was also imagining jquery as the java script library. Do you think this is possible?

Check out using CouchApp. CouchApp allows you to build your application in JavaScript and host it out of CouchDB. Its a great way to learn CouchDB and its a very rapid development environment.
CouchApp

Sure you can. Following is a link to a blogging project being developed with couchdb as the backend and PHP as the front. Its open source so you might get some ideas by looking at its code.
Arik Blogging Software

Like others pointed out, CouchApps are one of they key features of CouchDB. CouchDB's built-in admin interface “Futon” is built that way. — The example application in CouchDB: The Definitive Guide (free online book) is also a CouchApp: http://guide.couchdb.org/

Related

How to create a web portal using angularJS

Im fresh out of the academy and have been given my first project. I need to create a web portal that can interface with RESTFUL services. Can anyone advise me on where and how to start?
After I create the basic html and css Web page I have to integrate the CRUD module. Should I look at creating a single page application?
Any advise is appreciated, thanks.
As Matus Dubrava as mentioned, this is off-topic and a very broad question. But I can help you with some guideline -
You will be having a database (mysql, postgresql, mongo etc.), an API server (can be built with Java Spring Boot, Python Django, NodeJS, PHP etc.) and lastly a frontend application (can be built with angularjs, reactjs etc.).
First, you have to sort out what you already know among these and then plan ahead what other modules you need to learn. After deciding what technologies you will use, you can google the tutorials and sample code for that technology. If I can help more ask me out.
Hope this helps.

Is it possible to create a web chat application in plain Laravel

I just started studying and learning about Laravel Framework. My programming originated from Java Desktop application programming and I have not tried any web framework in the past.
I've little knowledge with Javascript, some PHP, HTML and CSS.
I would like to know if it's possible and advisable to create a chat application within a social network website I'm planning to create for school semester using Laravel.
If it's not possible, what web programming language for a total web newbie like me can use?
I thought it would be best for me play around and learn Javascript because the coding style is a bit similar to Java.
I would like to create something similar with facebook's chat application.
I'd appreciate any suggestion and help.
Thank you.
For such application you can use socket.io, based on node.js. The website offers a full tutorial to build a webchat.
You could do that in PHP using websockets, but it would be more complicated.
My advice is to keep Laravel for the non-interactive parts of your application and use node.js where you need real-time features.
It's more than possible.
Actually with the new 5.3 release, Laravel provides realtime app from scratch: https://laravel.com/docs/5.3/broadcasting
You need a third party service like pusher, but it's pretty easy to implement.
Go ahead and to dive in into the laravel worl, i can recommand https://laracasts.com/
Have fun! ;)

Java API accessed from Angular/Node

I found a project online (Jboss Teiid) that seems to only have a JDBC/Java API for connecting and managing the tool. I want to build a web-app (preferably in Angular) to manage Teiid, but I'm honestly not sure the best way. Would it be best to create a REST API to interact with Teiid since it only has a Java API? The JDBC driver is good for querying data, but the JAVA API is the only way to administer the tool and perform admin functions which i need.
Is there a better way? if there was a javascript client this would be easy, i'm just not sure the best route to connect my javascript web-app to this java tool.
Any thoughts/guidance greatly appreciated!
Thanks
API docs: http://docs.jboss.org/teiid/8.11.0.Final/apidocs/
If you are working with a JBoss stack, then might as well use their tooling. JBoss Forge can scaffold both a JAX-RS REST service and your Angular front-end at the same time.

Node.js Rest Framework

I plan to write a rather large-scale web application using JavaScript. I believe I will be developing the webapp using CanJS to organize my client-side pieces.
I am strongly considering using Node.js for my server-side component, but I was wondering what the best way to set up Node to accept and handle REST requests. I did some Googling and came across something called Express. Any comments on this?
Any help/suggestions would be greatly appreciated.
restify is a node.js module built specifically to enable you to build correct REST web services.
http://mcavage.github.com/node-restify/
Express is more directed towards full web application (rendering HTML, etc). Restify is just for web services.
Besides, the guy who created Restify works at Joyent, the company where Ryan Dahl developped Node.js (which is kind of guarantee quality).
For REST request handling, express-resource is a more focused solution than railwayjs that's also built on top of expressjs.
You can try http://railwayjs.com/ it is build on top of http://expressjs.com/
Express is nice and fast :) railway has similar stack to ruby on rails.
http://expressjs.com is the de factor standard, does Sinatra-like routing. If you want real easy automatic generation of resources (sort of Rails-style), try one of those libraries above.
If you want it real simple on top of express, try http://github.com/deitch/booster
Disclosure: I just released Booster this week.

CouchDB AJAX interaction

I'm writing a CouchDB sample. My intention is to write a web app using AJAX and deploy it in the tomcat environment. As I use the CouchDB I would like to know the way to interact with the CouchDB server. However there were few examples but I have few concerns over that.
1) As my application is deployed in a web server is it possible to connect with a CouchDB outside? Many examples uses apps which are deployed in CouchApp or Couch environment itself.
2) If so will it end up with cross domain issues. I found this in here
Connection AJAX, CouchDB and JavaScript
However will this be a problem? Is this the correct way to achieve this?
3) To omit above issues is it possible to use some server side javascript implementation as an example Rhino?
http://www.mozilla.org/rhino/doc.html
4) If I use Rhino above it wont allow many java script libraries to use. How do I interact with CouchDB then? Do I have to invoke native Javascript? Cant I use something like JQuery?
5) What are the best libraries for client side to achieve my goal?
Your help is appreciated.
Thank you
Based on your need to use tomcat, I would just recommend using ektorp (http://ektorp.org/). Just think of ektorp like a jdbc driver. No need to do ajax from the user interface, or no need to use javascript from java in your server.
Ektorp also lets you annotate your java classes with the javascript couchdb needs to make views. see the example here: http://ektorp.org/reference_documentation.html#d100e753
Hope that helps.

Categories