I started with Spring and Spring ROO as job switched with no past experience in Java Development. From last 1.5 year experience doing development in Ruby on Rails. So my new company want me to work with Spring and Spring ROO no Grails/Groovy:(. As no past experience in JAVA DEVELOPMENT struggling a lot with understanding of configuration of XML and Annotation support. Although i covered basics of but Now i was looking to find a way that Spring have such support of Ajax call CRUD operations of entities or Javascript call to execute script which i get as result of remote true URL click. As Rails framework (rails.js).
Hopefuly the person who work with ROR and Spring ROO may be best person to answer my question. Thanks in Advance.
To implement CRUD operations, I may suggest you to use REST service. It is easy to create with Spring MVC.
Spring blog
Good example
Another fast example
And ofcourse Spring documentation
This is copied part of my previous answer :
My advice to you would be to download the spring source(eclipse like IDE) :
http://www.springsource.org/springsource-tool-suite-download
After downloading it you can simply go to File > New > Spring Template Project > Spring MVC project
After you're done with creating project, the working template project(structured project, example controller file, example view, pom.xml etc.) will be created for you. You can just build it and deploy it to tomcat or whatever.
Btw. check this out :
https://github.com/SpringSource/spring-mvc-showcase/blob/master/MasteringSpringMVC3.pdf?raw=true
It is enough to get you started well off with Spring MVC.
I once had the same problem to you (I used to develope Groovy/Grails, then switch to Spring MVC). Unfortunately, I don't think there's an easy way to make what you ask in Spring. Spring doesn't have much productivity-enhanced functions,but it enables flexibility instead.
In short, you will be able to do Ajax, but with a lot more manual configuration (pure html/javascript-jQuery and java code) - like in Vacuum answer.
Jquery ajax might be the best solution you can find though it only help you send the the CRUD requests to server side. You must write java code at server to process those requests.
Related
After reading articles about Spring Security, I now try to put all what I have learnt to a dynamic web project (Spring v5 MVC, Maven, MySQL5Dialect) in Netbeans IDE, I created: AuthenProvider, ApplicationConfig, UserController, UserRepository, SecurityUserDetailsService, etc. Everything including database tables and data done, but it seems not working at all.
So I am looking for a sample source code (a working sample Spring Security), so that I can make my project working: login, OAuth2, Remember Me, logout, URL access control (maybe spring-security-taglibs), log in form with authentication by JDBC of tables users, roles, attempts (blocked the user after 3 fails of log in attempts).
Anyone has a working sample source code, can share with me, will be appreciated.
Or anyone can tell me where I can find the sample code, will be great too.
In case Spring Security is not a good way, please let me know. Thanks
In various projects, I am using versions 2.0.2 and 2.1.4 of Spring Web Services. Given that neither of these are listed any longer on the project page at spring.io (http://projects.spring.io/spring-ws/) I am thinking that they're past EOL. Can anyone confirm, or better yet, provide a link to the official EOL announcement/schedule for Spring Web Services?
Thanks in advance.
Good news! Since Spring reorganized their web site (quite some time back now, but this is a really old question), it's much more obvious: https://spring.io/projects/spring-ws#support.
I'm working on a webapp running on Tomcat which using spring-data to connect to a neo4j graph in embedded mode.
I would like to use neo4j server instead of the embedded mode and I am looking for some help to be sure about how to do that.
Some of my application services are quite difficult and combine, in a single transaction, the result of several cypher requests in a dto sent back to the user.
First I thought that I have to create a server unmanaged extension and I think I should follow these following steps.
- Keep my webapp with springMVC and spring security to hold and secure users sessions.
- Regroup all my transactional services in a specific jar my-app.jar
- Use Jax-RS to add a REST access point on each of my service of my-app.jar
- use something like spring restTemplate from my spring controller to call services from my-app.jar
First question : is this way of doing things is the good way ?
Second question : I have many spring injection in my services layer. How can I keep them working (how can I add dependencies in the server extension ?
Then I discovered graphAware and I wonder if I should use it instead.
And finally I just read this post http://jexp.de/blog/2014/12/spring-data-neo4j-improving-remoting-performance/ and it seems that I should use
the SpringCypherRestGraphDatabase (as explain in the bold text at the end of the article).
Well, I'm a little bit lost and I would appreciate any help to use neo4j server instead the embedded mode for my application which contain some complexe transactions.
You have a number of options here and you are on the right track with your thinking.
Option 1:
If your use cases are business-logic-heavy, and your question suggests that they are, going the unmanaged extension route is one option.
Essentially, you can then combine the most performant Java API and Cypher (if you wish) to perform your use case. I wouldn't use SDN here by the way, so you have to do your mapping manually, but is there really any mapping? Maybe you just want to execute traversals / Cypher queries for each one of your use cases.
Each use case then exposes a simple REST API, which is consumed by your Spring-powered application running Spring MVC, Spring Security, and all that. You can use the RestTemplate from Spring in your app's Controllers.
To add a twist to all that, you can use the GraphAware Framework to develop the "unmanaged extension" using Spring MVC as well. That would be my preferred option, knowing nothing about your domain/app.
Option 2:
Use the new version of SDN (v4) as Michael suggests. This allows you to run your application with annotated domain objects, Spring MVC, Security, et al. Operations (CRUD and other) are automatically translated to Cypher and sent across the wire to Neo4j running in server mode (no extensions needed). Results are then marshalled back to Java objects.
We're about to release Milestone 1 of SDN v4. It shouldn't take more than a week. That said, it is still going to be a Milestone release, thus not ready for production. A GA release is expected in May (ish).
You can already try SDN v4 yourself. Clone this repo: https://github.com/spring-projects/spring-data-neo4j, make sure you're on the 4.0 branch, and do an mvn clean install on it. Here's a sample app, built using Angular JS and Spring Boot.
Please do get in touch with feedback / questions / problems (best by email info at graphaware dot com). Cheers!
I suggest you wait a bit until SDN4 Milestone 1 comes out (developed by GraphAware) this was written from scratch for Neo4j-Server.
I am in an early stage of a small Spring-based project which utilizes Spring Data Neo4j with an embedded database (but possibly could use a server instance in a later development , too).
My data model and relationships have been designed, Spring Security (with Neo4j), MVC and tiles are set up and also seem to be fully functional.
Now I have the additional requirement to allow login with social networks.
I'm really stuck with trying to integrate Spring Social with my above mentioned setup. Basically I have a rough idea that I need to make use of the cross-store Neo4j component but have no real clue, how I could start with it.
I tried to find something useful for my case (SDN Neo4j + Spring Social Security) on github but was not really successful with that either.
Can anyone provide me an example configuration or even point me to some examples (I obviously didn't find before) ... any help is highly appreciated.
I don't think there is a Spring Social connector yet, but it shouldn't be too hard to write (there is one for Mongo). If nothing else, you can use the https://code.google.com/p/google-api-java-client/ directly form a service, exposing the google oauth callback from a Spring Controller, should work too.
https://code.google.com/p/google-api-java-client/
Neo4j connection repository for Spring social has been implemented here using neo4j-ogm. You can reuse that. https://github.com/maciossek/spring-social-neo4j
Perhaps like some of you, I am inundated by the number of JavaScript MV* out there. When I thought I was going KO, I found Backbone, then Ember.
I recently saw some demos on Meteor and I am extremely impressed. But I know nothing of Mongo and I "think" Meteor requires it. (http://www.meteor.com/screencast)
I am too heavily invested in Entity Framework & ASP.net MVC to move away from them but Meteor looks like a terrific client side MV*.
Does anyone know if Meteor can work with a Microsoft back end (ie EF and ASP.net MVC)?
Thanks.
UPDATE:
Yes I see the NuGet package for MongoDb, but truth be told I am only interested in Meteor. Is it a both or nothing situation? Meteor looks like bleeding edge and I really would appreciate any links to documentation on its use with a MS backend.
For anyone still reading this in 2013 or later - it's now possible to run Node.js on Windows under IIS (just install the support with the Web Platform Installer).
There's also versions of Meteor and MongoDB for Windows and Meteor supports deploying a bundle that will run under "pure" node.js
As far as I know, You can't. it runs over Node.js, additionally there is a client implementation of a MongoDB like API that would be a pain to implement with a EF backend I think
Yes, sort of. Meteor runs server-side code using node.js, but also provides some very useful services on the client side like templates, routes, collections, session variables, and reactivity.
The way to use it with a .net back-end (or any other language) is to create an api that can be accessed with Meteor. You can create Meteor collections in the client code, which don't need a mongodb instance. Simply access the api to load the collections with the correct data, and then you can use Meteor as you would normally.
However, for most apps it would be much simpler to implement everything in Meteor.