how to integrate springREST into wicket website? - java

we maintain online book shop using java wicket and it also have search function for finding books in MYSQL database. If someone search for "Fiction" in the search box, the results will contain metadata of each result. If a user click on title, it will take him/her to details page.
I have a requirement to add functionality of reviews box/form in the details page using spring. we do maintian 2 other websites which needs similar sort of work. So we decided to develope this feature as a small individual and re-usable application then integrate into java Wicket or ZEND framework.
what i need to do is:-
1) get details from the form like name, email and review information - JSP or HTML, JQUERY
2) show the entered review on the web page and post those details to MYSQL (update the reviews table in db) when form submitted. springREST
Is it really possible to accomplish using SpringREST? or is there any options for this?
can anyone give some ideas on this requirement how to do?

Sure you can do this. If you implement this new feature with javascript, you can include it to both frameworks. I would suggest you use a javascript framework like AngularJS or Bootstrap as they will make calling the rest service easier.
In addition you need to deploy your rest service as an application or bundle it with your existing application that contains the wicket app.
Here you'll find an example on calling rest service with AngularJS How to access the services from RESTful API in my angularjs page?

Related

How can i use ember js without ember-cli with PHP or java?

How can I use ember js without ember-cli with PHP or java? How can I interact with back end data? Any example will be much appreciated.
The first thing you'll need to understand, is that ember-cli is a command line interface. It acts as a blueprint generator and an asset pipeline and glues all the ember stuff together in a wonderful productive package. It's just standard now, and you wouldn't want to use Ember without CLI. They are basically now the same thing unless you were using Ember since pre 1.13 and can't upgrade.
Ember is a JavaScript framework for front-end/client-side user interface. It doesn't deal with server style data storage like a traditional Apache/PHP. In a PHP setup, each page is rendered on the server side and then delivered to the browser in a complete form. Ember is more like a shell that you fill with data from somewhere else, but also has the ability to manipulate that data in the browsers and persist it back to the data-source.
The data source could really be something as simple as local storage. Maybe a simple game that just stores your userScore in the built-in local storage.
The data source could be something like the WordPress API, where ember pulls in posts or page data to display on the screen. Maybe you even have a form that persists new posts back to the server.
You could use parse or firebase for real-time back-end as a service. Or you could build a server of any sort that was able to generate an API that Ember could consume.
Currently, rails is popular for the server. Also, node frameworks like hapi.js and sails. Elixr and Pheonix are gaining interest and have proven to be a powerful backend team with Ember.
Ember uses ember-data and adapters to take in API data and serialize into a simple set of conventions.
If you have API endpoints coming from PHP or Java, you could use them - however, if you are starting a new project - I wouldn't think that would be an ideal route.
You can follow the Ember guides tutorial to learn more about how Ember works. Good luck!.

What should i use to create web services app?

As an application to get a job I need to make a web app. I'm only familiar with Java SE so here comes my concerns. I need to make web service where at the beginning there will be authentication window, then I need to show the JSON data (probably parse it and show) as table or as list with button near to choose one of the row from the table to get to the next page where there user can choose a materials and so on.
I have data in JSON on server I need to pull it from there, then I need to show data which looks like this /materialDetails?ID=x where x is ID (it's probably HTTP or URI). Should I use Java REST? If yes I need to create a site in XML and then put java data inside? There're only a few tutorials on the internet and I can't find any good(sometimes the problem is in server, sometimes with dependencies). I was looking for information also on youtube but except https://www.youtube.com/watch?v=X36Dud8cS4Y I cant find anything useful? Could someone explain me this to make it at least a lil bit easier? Or just lead me to pick a specific framework. Thanks in advance
You could create a Dynamic Web Project with Tomcat and a MySQL Database for starters. You could use RESTEasy to create a WebService that gets data from your Database.
I don't know what exactly is expected from you, but this might be a good start. "Making a web app" is a bit like saying "I need to develop a java program", it is a bit vague !
I don't know REST but I think your application can be implemented with this technologies: HTML and Servlets/JSPs.
I would write an authentication page in HTML (one form element with 2 inputs and a button) which would pass credentials to a Java Server Page or a Servlet (they're equivalent). There I would build the table (another HTML element) thus producing a new HTML page.
P.S.: you're using JSON as a format so there's no need to learn XML.

Web Data Extraction and Form filling

I am currently beginning the development of a (UI?) backup from a Webplatform. It is not our platform and I don't have access to the source.
I just have the HTML-rendered view of the Form-Data of the elements I entered.
So the task is to browse to the HTML, store the data (XML/JSON) and then login to the site to fill out the forms again to resubmit the data...
At the moment I'm prototyping with C++ QtWebEngine.
What' the best way to do such a task? What are good frameworks for "browsing" the web and analysing HTML?
Solutions in c++/java/javascript (or a firefox-addon?) are preferred.
Thanks for your help!
same as DSL language interpreter use "Document Object Model (DOM)"
my advice : C# webform app and webbrowser control:
webbrowser.navigate([url])
WebBrowser.DocumentCompleted Event
WebBrowser.Document (read document and help about "System.Windows.Forms.HtmlDocument" )
maybe need inject some java script in
/*
please don't use this info for hack and attack
*/
You could definitely do something like this using Firefox's Addon SDK. In particular you should look into the PageWorker module that allows you to load and run JS code against web pages without showing the page - everything happens in the background.

making dynamic ajax web application searchable

I have developed ajax web application that is constantly generating new Dynamic pages with ID ( like http://www.enggheads.com/#! question/1419242644475)
when some one add question on website.
I have made my ajax web application crawlable, I have implemented this as this Link recommended
LINK : https://developers.google.com/webmasters/ajax-crawling/
and tested that 'fetch as google' returns the html snaphots. and tested on facebook developer tools it also fetch data accurately. I've submitted a site map with all the current urls. but when we search, only some of the links of sitemap show in google search result. and google refuses to index any of the ajax links, although there are no crawl errors.
1--My Question: So what else I have to do to show all link of my apllication in google search result.
2--My Question: And One more question I have to ask is, as I explain above that this application is generating new dynamic pages so we have to regenerate the sitemap eachtime(or at set interval) when some one add a question on my web. Or is there any other significant way to handle this situation.
And dont't know how "Facebook.com" , "Stackoverflow.com" , "in.linkedin.com" manage their sitemap if they use...???

please suggest a good framework for dynamic form based web application

Hi all
I have trying to create a dynamic form based application submission system.
Here application forms are dynamically generated from a control panel where the user
can design the form and data-type. When end user submits the forms it gets persisted into database.
What technologies can I use to efficiently design such a web based system in java.
Thanks and regards,
GWT is the most suitable solution for what you want. If you have swing or swt experience, you would be easily familiar with GWT.
Well , similar web site to what you want; http://glowday.com/editor

Categories

Resources