Any place to learn spring batch with JSL - spring-batch

I am new to Spring Batch and Job Specification Language (JSL). I am looking for some example/guide developing spring batch project using JSL. Can recommend me some sites or books for me to read?

A good starting point would the section from the reference documentation about JSR-352: https://docs.spring.io/spring-batch/docs/4.3.x/reference/html/jsr-352.html#jsr-352. There is a toggle at the top of the page that allows you to choose how to show samples (in either XML of Java configuration). You can also find samples here: https://github.com/spring-projects/spring-batch/tree/main/spring-batch-samples.

Related

Is project summary supported in web site output?

First of all, SHFB rocks :-)
I use the Standalone Help File Builder and Tools to render a web based "help site".
However, the specified project summary seems to be omitted/ignored and never found in the resulting output web site files.
Can anyone tell me how to include the project summary in a SHFB rendered web site?
The short story - an project summary makes no sense when using conceptual topics only.
When documenting code libraries it is important that namespaces are described. XML documentation comments do not support the addition of summary information for namespaces. However, this extra information can be added using Sandcastle Help File Builder.
SHFB gets around the limitation by allowing you to manually add a summary to each namespace. This summary is stored within the SHFB project so that you do not need to recreate it each time you build the documentation.
Having some namespaces you may want to add a root namespace and comments as node into the resulting compiled help file.
As shown below, you need to set some options and add text:
The resulting CHM file:

EPiServer migrate content from home grown CMS

Hopefully someone can help me, I'm new to EPiServer and have been given a data migration task. We are using the latest version 8.5. I need to migrate content from a clients home grown CMS (that luckily is in a tree like structure) to EPiServer. There doesn't seem to be a whole lot of information about this on the web - perhaps I just don't know the right thing to search for.
It looks like using the EPiServer.ServiceApi might be the route to go but again locating useful documentation is proving difficult.
I was thinking of setting up the client CMS in SQL Server and writing a simple console application to call the EPiServer.ServiceApi inserting the content. If anyone has any information on this or better still and example i would be very grateful.
Thanks,
Dan
If you are just importing content from another CMS I would write a scheduled job in EPiServer:
http://world.episerver.com/code/dannymurphy/Stoppable-Scheduled-Job-with-feedback/
That job then uses the standard IContentRepository to create content:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Content/Persisting-IContent-instances/
That way you can run it whenever you want and have access to EPiServers complete API. Also you can see progress of the import through the job status.
In the job you can read the content as a file in any format you like or directly from the source CMS database or some xml or RSS feed perhaps.
I have moved content from PHP, Java and .NET CMS this way. In .NET you could even access the source CMS via WCF or SOAP if available.
The ServiceApi is relatively new and more focused on Commerce products and media assets rather than CMS page and block content so I wouldn't use that.
There is complete documentation below for the ServiceApi by the way, did you not find it?
http://world.episerver.com/documentation/Items/EPiServer-Service-API/
Regarding language management you can read more in the below links:
http://cjsharp.com/blog/2013/04/11/working-with-localization-and-language-branches-in-episerver-7-mvc/
http://tedgustaf.com/blog/2010/5/create-a-new-page-language-branch-programmatically-in-episerver/
Basically you have two options for multiple languages. If the content is just straight translations you should create nine different language versions (branches) of the same page. You can also have multiple sites in an EPiServer installation but that requires 9 separate licenses (and the associated costs).
I've done a lot of EpiServer content migration projects. The easiest way if it's possible is to export your current sites tree in Json and then import that into EpiServer. I've had to do it on a recent project and mixed with Json.net it's pretty easy.
If you want to go that route you can find all the code to do it here: EpiServer Content Migration With Json.Net/

Scala - Template based run time code generation

I am looking for a good template based run-time code generation library in Scala. I need this for my ERP system to generate artifacts (html, and other code files)
Can any please point me in right direction?
You should take a look at Scalate. It has multiple syntax choices and if you use SSP you can easily create templates for text other than HTML as well.
If your app is web-based, Play has a templating system for generating the output pages.

How do I create a custom form and controller in Spring Roo?

I've been looking into this all day now, and I can't say I've quite understood how to go about this.
So far I've created a Spring Roo project along with a bunch of entities. What I want to do is allow the user to retrieve data from the database through a form. This means I will need a form for user input along with a controller that will handle the request after the user clicks on the "submit" button and get the information from the database.
The examples I've seen so far on the internet haven't really helped. I would really appreciate it if someone could explain how I can complete this task. Thanks :)
roo>help
roo>web mvc setup
roo>web mvc all --package ~.web
Once Roo has set up the scaffolding you can simply add a new controller class like the ones roo generates and code it to do what ever you want. Roo will leave your custom controllers and jsp files alone.
You can create your form based on a tutorial like this one http://viralpatel.net/blogs/spring-3-mvc-handling-forms/
and then call a roo generated finder method on your domain object.
Spring/roo custom finder may help with this.
Roo will not generate the form to front the finder method.
I believe that effectively using roo requires a solid understanding of spring. I would take a Spring 3 mvc tutorial (if you have not yet) and look over the files generated by roo and look up anything it generated that you don't understand.
I had the same experience and it turned out i had jumped on learning Roo and trying to get it to work for all my custom requirements without even understanding Spring web MVC completely.
My suggestion is to go through the Spring web mvc documentation and tutorials, create a small mvc application from scratch and then come back to Roo. Roo is great but you need to write your own code for all customization. So all you need to do is write your own controller and view for specific requirement.
BTW, did you see if your requirement (get the information from the database) is covered by any of the available finders? If it is, you just need to push in the right finder using Roo and it should be available to all users.

Web based plugin architecture for simple user interfaces

I have a web based application using Primefaces with a very basic plug-in like architecture. The configuration of these plug-ins was all handled with xml, which is not so user friendly system.
I would now like to allow for each plug-in to be configurable via the web application, what are my options?
I have looked into Portals and Portlets but that seems like a rather big change to my application and my plug-ins do not require such complex user interfaces, a textbox or two of configuration is more than enough.
Does anyone have any suggestions or advice and what would be the best route here?
Create a simple page , per plugin that read the XML file, parse the option that you want to change , present it to the user with a simple interface, and save back the XML file.
Take care of the saving part and password-protect this page!