ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

ZK-CodeMirror released

mjablonskiTop Contributor
20 Oct 2010 11:53:32 GMT
20 Oct 2010 11:53:32 GMT

Hi,

today I've released the first public version of CodeMirror for ZK.

CodeMirror is a JavaScript library by Marijn Haverbeke that can be used to create a relatively pleasant editor interface for code-like content - computer programs, HTML markup, and similar.

Download and sources of the project are located at: http://code.google.com/p/zk-codemirror

Online-demo is located at: http://www.jease.org/codemirror

Please feel free to ping me if you have questions or suggestions.

Have fun,
Maik

tmillsclare
22 Oct 2010 06:21:08 GMT
22 Oct 2010 06:21:08 GMT

Great Maik! Good job it looks excellent thanks.

oberinspector
22 Oct 2010 15:51:07 GMT
22 Oct 2010 15:51:07 GMT

Very happy to see this!!! I was often asked to port my old codepress component to ZK 5, but... . The codemirror component looks much nicer.
Any plans to provide this in a mavan repository!?

thanks a lot!
/thomas

mjablonskiTop Contributor
23 Oct 2010 03:14:46 GMT
23 Oct 2010 03:14:46 GMT

Hi Thomas,

I don't use Maven (nor have any fundamental experience with it). Maybe you like to contribute to ZK-CodeMirror by providing the necessary changes/procedures?

Cheers, Maik

oberinspector
23 Oct 2010 12:15:26 GMT
23 Oct 2010 12:15:26 GMT

Hi Maik,
i can do the Maven integration for zk-codemirror. Don't know yet how to push it in the public maven repositories, but this is the second steps. Please add me to the developers of zk-codemirror and i can make the changes. The projects directory strucure will change since one big feature of maven is to have default places for code and resources. Probably we should make a branch for the maven version.

Maven is a very great tool to build and keep the dependencies in one place - the pom.xml. When you use eclipse you may want to try the m2eclipe plugin (and the m2eclipse-extras WTP plugin).

As a first step i will checkout the code and setup a maven projekt with this and provide it in my svn server. Probably tomorrow.

/thomas

oberinspector
23 Oct 2010 17:28:13 GMT
23 Oct 2010 17:28:13 GMT

Hi Maik,

i converted the zk-codemirror to a maven project... you can retrieve it from my public svn repository: http://opensvn.empego.net/zk-codemirror/trunk/zk-codemirror
It's only left what is necessary to build the jar. Demo and sample code should probably be a separate demo application.

To provide it in the public maven repositories i found this introduction: http://nexus.sonatype.org/oss-repository-hosting.html ...so prbably the binaries could be uploaded to a sonatype repository, which will be synchronized with the public maven repositories. I will have a look at this tomorrow.

In my repository you can find also a zk filebrowser component working almost like the good old Windows file explorer. Thats where i want to use your zk-codemirror component to browse and edit files on the server.

/thomas

mjablonskiTop Contributor
27 Oct 2010 09:18:54 GMT
27 Oct 2010 09:18:54 GMT

Hi Thomas,

sorry for the delay, but I've spent some days hiking in the mountains.

I've checked your SVN and it seems that Maven requires some rearrangement of the code base, doesn't it? I really like the possibility of having zero turnarounds when developing components. This is the reason why zk-codemirror was set up as web/demo-application which is ready to run right after checking out the sources.

Can we come up with a layout which allows this "core maintainer friendliness" with support for Maven? Could it be another possibility to use some sort of staging? Is it a Maven requirement to push the sources to the Maven repository at all? Wouldn't it be enough to publish just the Jar?

Sorry for the silly questions, but I'm not very familar with Maven and required policies.

Thanks,
Maik

oberinspector
27 Oct 2010 13:28:15 GMT
27 Oct 2010 13:28:15 GMT

Hi Maik,

hiking in the mountains sounds great... which mountains?

It would be of course possible to add all the WEB-INF stuff to the project and create a jar OR a war with maven. With this the maven project should behave as your original project, but this is not the intention of maven i think. Maven has some defaults where things have to be stored. So the WEB-INF related stuff has to be stored in src/main/webapp. One point of maven is to build, test, create different artifacts like jars, source-jars, javadoc, etc. and the other big deal is to keep all dependencies up to date. In the pom.xml all the dependencies your jar file needs are noted with the required version. The referenced jars are pulled from maven central repository together with their pom.xml and stored in your local maven repository. The only dependency zk-codemiror needs to compile is zk.jar in version 5.04, which is pulled in with:

<dependencies>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zk</artifactId>
<version>5.0.4</version>
</dependency>
zk.jar has again dependencies in his pom.xml which are pulled in automatically through maven. This is done until all hierarchical dependencies are solved.

So when i want to use zk-codemirror from maven-central i can simply rightclick on my project in eclipse and select "add Dependenciy" type "zk-code..." and the zk-codemirror.jar is offered for selection... thats all! I don't have to care which jars have to be in WEB-INF/lib since maven cares for me.

One problem is that the latest ZK libs are not stored in maven-central - even not the CE ones and it is strictly not recommended or allowed to provide jars in maven-central, which have dependencies not itself are stored in maven-central. So until this is solved it might not be possible to upload jars with zk-dependencies to maven-central. I mentioned this in another thread:
http://www.zkoss.org/forum/listComment/13391

since i have also some zk components to provide i will follow this. At the moment i'm looking for an opensource home for this components... probably it will be javaforge.com.

PeterKuo
28 Oct 2010 21:47:34 GMT
28 Oct 2010 21:47:34 GMT

@oberinspector
Nice to have your zk component to provide.
How about place it at google code?
Many ZK related project has hosted at google code, bandwidth does matter.

mjablonskiTop Contributor
30 Oct 2010 11:59:07 GMT
30 Oct 2010 11:59:07 GMT

Hi,

@Peter: the project is already hosted on google code...:-)

Maybe an idea: if ZK uses a dedicated maven repository, maybe the ZK-Team can provide some means to upload third-party-jars (like zk-codemirror) to this repository, so people using maven have just one repository to configure etc.pp.

Cheers, Maik

tmillsclare
31 Oct 2010 21:02:31 GMT
31 Oct 2010 21:02:31 GMT

Hey Maik,

Are you asking whether we can upload zk codemirror to our maven repository?

Cheers, Tim

mjablonskiTop Contributor
1 Nov 2010 04:49:59 GMT
1 Nov 2010 04:49:59 GMT

Hi Tim,

in principle yes. I don't know if this is possible at all (due to policies etc.pp.), but as ZK seems not to be available via "official" maven-repos in the future, it would ease the dependency-management for maven-users when working with ZK-Core and ZK-3rd-party libraries. As I don't use maven I have no real stakes in this question.

Cheers, Maik

oberinspector
1 Nov 2010 07:02:22 GMT
1 Nov 2010 07:02:22 GMT

hi,

providing zk-codemirror in the zk repositories would be a possble solution. When using ZK this repository is mandatory anyway at the moment, since the latest zk jars are not in maven-central. So there should be a way to deliver jars for upload them to the ZK-repos.

@Peter
at the moment i started with JavaForge as projekt home for my zk-filebrowser componentset. The tooling there seems very comfortable, but also very complex. I plan to write some wiki documents and a demo app within this week.

/thomas

terrytornadoTop Contributor
1 Nov 2010 09:08:37 GMT
1 Nov 2010 09:08:37 GMT

I agree with Maik and Thomas.
If you have a maven managed project and must put some jars like zk calendar or other zk libs manual in your project than you have such libs all times in your CVS repository too. That's not the sense of maven. So, please find a solution that such additional components and user contributions can be mavenized.

best
Stephan

mjablonskiTop Contributor
11 Nov 2010 06:22:48 GMT
11 Nov 2010 06:22:48 GMT

Hi,

I've just uploaded a new release for zk-codemirror which uses the recently released CodeMirror 0.91 (including some important fixes for WebKit-based-Browsers like Safari or Chrome).

zk-codemirror works very stable and I can recommend it for production... I'm already using it in the latest JeaseCMS as pleasant ScriptEditor. Works like a charm.

Have fun,
Maik

mjablonskiTop Contributor
16 Dec 2010 10:05:20 GMT
16 Dec 2010 10:05:20 GMT

Hi,

maybe an interesting update: I've added a parser for Mediawiki-Markup to zk-codemirror. And thanks to Matt who committed an improved configuration approach.

Download and sources of the project are located at: http://code.google.com/p/zk-codemirror

Online-demo is located at: http://www.jease.org/codemirror

Cheers, Maik