can Spring framework use NOSQL database?
Is it possible to develop a spring application in which I want to use NoSQL database?
Please provide me with proper proof and example if possible.
Spring Data has multiple projects, quite a number of them are intended to be used with NoSQL databases, you may find a full list here :http://projects.spring.io/spring-data/ (both main and community modules). Some of the notable examples are :
Spring Data Cassandra - http://projects.spring.io/spring-data-cassandra/
Spring Data MongoDB - http://projects.spring.io/spring-data-mongodb/
Spring Data Neo4J (GraphDB) - https://projects.spring.io/spring-data-neo4j/
Spring Data DynamoDB - https://github.com/michaellavelle/spring-data-dynamodb
Spring Data ElasticSearch (search index) - http://projects.spring.io/spring-data-elasticsearch/
...
Have a look at spring data mongodb:
http://projects.spring.io/spring-data-mongodb/
Related
Some one can help me with some angularjs world doubts ?
Is there a scaffolding tool for angularjs? What is a good tool to storage data? Firebird?
For AngularJS scaffolding you can use Telosys Tools a simple code generator
using an existing database to generate CRUD screens.
See the tutorial for Angular JS : https://sites.google.com/site/telosystutorial/angularjs
and the tool web site : http://www.telosys.org/
You can store your data in any kind of database and expose a REST API to serve the front-end. You can also generate the service layer with REST services ( Spring MVC or Jax-RS )
I am working on a web application that uses Spring MVC framework and hibernate for the backend and using DAO classes and DTOs for persistence. After entity fetch the dto is being sent as a JSON to the frontend that uses angularJS for the front end.
I am asked to add caching to the frontend application.The dB call is to be avoided if the the request is hit again within some time frame. Please suggest me how i can implement this. Also please tell me some different ways how caching can be implemented to make frontend perform better.
Thanks,
You should use EhCache here some tutorials
http://www.mkyong.com/spring/spring-caching-and-ehcache-example/
or
https://amitstechblog.wordpress.com/2011/11/08/configuring-ehcache-with-jpa-hibernate-spring/
I'm looking at using Sailsjs for server side processing and validation and angular on the client side. Apparently BreezeJS supports Odata and WebApi for its interaction with the datasource. I know that Sails provides a REST Api out of the box.
How would I go about setting up Sails to provide either OData or WebApi to connectivity for Breeze?
Also, is there any other well known way of connecting Sails to Angular that provides the ability to generate queries on the client side that then get executed on the server? (My use case is filtering large datasets and manipulating the result on the client before batch updating the datasource)
Thanks!
What database and/or ORM are you using? That affects the answer, because the OData query must be turned into the appropriate query for your ORM/database. One of the following might work for you:
The breeze.server.node repo includes an OData parser that turns OData URLs into expression trees. Then there are adapters that turn these expression trees into MongoDB queries or Sequelize queries. If you are using MongoDB or Sequelize, this might be what you need. You can write your own adapter for Waterline if none exists yet.
The breeze.js.labs repo includes breeze.ajaxrestinterceptor.js which converts Breeze's OData URLs into REST-style resource URLs. It only supports a subset of the possible URLs, and will need to be adapted to your own API conventions.
An upcoming Breeze release will offer an alternative to OData: an all-JSON query language, inspired by the MongoDB and Sequelize query languages. This will make it easier to write your own backend, and to support Sails/Waterline in the future.
I am trying to choose an auth framework for GAE and would be very interested in other people's experiences on this subject.
I had a look into Shiro and Spring-Security so far. What could you recommend?
Luke Taylor wrote a good blog post explaining how to use Spring Security and GAE together. I believe that both Shiro and Spring Security would be suitable for GAE so it's really a question of what you need. Shiro is simple to implement but limited. In contrast Spring Security is a lot more powerful but this brings some additional complexity. Having said that, recent releases have been much simpler to use (especially since the introduction of namespaces).
Personally I would go for Spring
Personally, I would go with GAE + Guice (ligthweight dependecy injection by Google) + Objectify 5 + JAx-Rs implementation (RestEasy or Jersey) + Shiro.
You can find a good example over here - http://hackersv.blogspot.de/2014/02/shiro-guice-maven-and-google-app-engine.html
Jello-framework is a new Java framework for Google App Engine that includes comprehensive Data Authorization model. One of Jello's key features is its inline Authorization Model. With Jello you can assign different access levels for data elements at any resolution (Namespaces, Entities, Fields, Actions) and specify who is authorized to access the data via the REST API.
I want to know different options available when we are connecting asp.net mvc application to database.
What are pros and cons of each method and what is best method to choose.
In Traditional asp.net web form application i am using DAL approach, which seems to be very useful to me so far even while dealing in shared hosting environment. I want solution which i can apply in shared hosting environment.
Thank you everyone :)
On the website Mikesdotnetting.com, there is an article titled ASP.NET MVC is not all about Linq to SQL. Basically what the article talks about is taking a standard ASP.NET web forms n-layered application and moving it into the world of MVC. The only things that are changed are the actual web forms into views. He leaves much of the application as is, the data access layer, the entity objects, the business rules, etc. From reading the article and seeing what you're asking, I think you can easily use what you know (your DAL) and combine that with MVC.
Good luck on your project, and hope this helps some.
Original Web form based application article:
Building Layered Web Applications with Microsoft ASP.NET 2.0
I use the the following for the data access:
Entity Framework (Code First)
Windsor Container for dependency injection set up with the repository pattern to make my controllers testable without having a database.
Blog post using EF Code First with MVC
Explanation Repository Pattern
Blog post about using MVC3 and Castle Windsor
There are different Ways to Connect to Databases for ASP.NET MVC web application using ENTITY FRAMEWORK :
Code-First
Db-First
Model-First
Code First approach lets you generate databases and datasets automatically .
Use it if you are developing a large Web application and expecting changes of the Models in Future. So you can alter a database after making changes in the Code Accordingly.
Db-First lets you generate models automatically giving good control over Databases. Make sure there is a Database Admin working in the application.
Model-First Approach is not good option as developer would not be having control over both Model and Database.