0

ZK-CodeMirror released

asked 2010-10-20 11:53:32 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

updated 2010-10-20 11:54:13 +0800

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

delete flag offensive retag edit

15 Replies

Sort by ยป oldest newest

answered 2010-10-22 06:21:08 +0800

tmillsclare gravatar image tmillsclare
799 2 5 30

Great Maik! Good job it looks excellent thanks.

link publish delete flag offensive edit

answered 2010-10-22 15:51:07 +0800

oberinspector gravatar image oberinspector
219 2 2

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

link publish delete flag offensive edit

answered 2010-10-23 03:14:46 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

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

link publish delete flag offensive edit

answered 2010-10-23 12:15:26 +0800

oberinspector gravatar image oberinspector
219 2 2

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

link publish delete flag offensive edit

answered 2010-10-23 17:28:13 +0800

oberinspector gravatar image oberinspector
219 2 2

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

link publish delete flag offensive edit

answered 2010-10-27 09:18:54 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

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

link publish delete flag offensive edit

answered 2010-10-27 13:28:15 +0800

oberinspector gravatar image oberinspector
219 2 2

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.

link publish delete flag offensive edit

answered 2010-10-28 21:47:34 +0800

PeterKuo gravatar image PeterKuo
481 2

@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.

link publish delete flag offensive edit

answered 2010-10-30 11:59:07 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

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

link publish delete flag offensive edit

answered 2010-10-31 21:02:31 +0800

tmillsclare gravatar image tmillsclare
799 2 5 30

Hey Maik,

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

Cheers, Tim

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-10-20 11:53:32 +0800

Seen: 2,051 times

Last updated: Dec 16 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More