Version Control
Finished?
Version Control
Written by Flavio Adalberto Kubota   

Some things happened since last post. The most important thing for me was presenting my project at Joomla! Day Brazil. At event, I told about what my extension do and how it can help user's life. More information about my experience is coming.

 

I've noticed many people are testing my project at demo site. I fixed some bugs and updated demo site with the latest version.

If you want to see, enter this site, with this username and password:

username: demo

password: demo

or

username: demo2

password: demo2

 

You can also download and test with other configurations options that is not available at demo site.

Download component at this page.

I am still testing and documenting Version Control component.

 

Summer of Code 2008 ends

Google Summer of Code has just finished, and during this last three months I has great experiences with Joomla! community. I am motivated to continue this project, improving it, and I am also available to help Joomla! team for what they need.

Thanks to Joomla! mentor's team who made the Summer of Code happen and special thanks to Ian MacLennan, my mentor who always helped me in the project.

 
41 Votes

6 Comments

New release - demo site available
Version Control
Written by Flavio Adalberto Kubota   

It's available a new version of version control system for article component. I updated the download page with this new release. I am ready to release an alpha version and start tests.

At this package, you can find merge and compare functionality working.

When merging two versions, it is possible to choose which part of the content to merge. Parts that is from one version is marked in blue and the other version is in orange.

In comparison functionality, there are two ways to compare content, I still do not know which one to release. I left two buttons at page and you can test both ways.

The first one, two versions is located side by side and lines make the relations between them. Colors shows which part was changed, deleted or added.

The second way, it is like we have only one version, where added and deleted lines are colored. Changed lines from two version are in yellows and they are side by side.

A new functionality of this release is that more than one user can edit a content in the same time. This is configurable, it is just for back-end, and it need to open the content througt Version Control Component. Once it is possible to merge two content, then there is no problem several users editing an article.

 

I set up a demo for you test. If you login, please leave me a comment here.

user: Demo

login: demo

password: demo

 

user: Demo2

login: demo2

password: demo2

 

Click here to go to the demo site.

 

 
39 Votes

9 Comments

My first release
Version Control
Written by Flavio Adalberto Kubota   

It is available an installable package of version control system for article component! You can dowload here. It is not a alpha release yet. I still need to apply many tests, but it is possible to view how the extension is.

This release have some configurations, such as choose if article changes must be published when modified or an admin that should publish a content. Other configurable parameter is if a version became the latest one when published.
There are also a simple notification mail, that will be improved for nexts releases.

This extension is composed of three package: a component and two plugins. To make it work, you need to install all packages and enable both plugins. You also need Joomla! 1.5.4 or higher.

Feel free to give your feedback, telling what is not good, what need to be improved and what is missing in the component!!!

 

 
43 Votes

9 Comments

Almost there
Version Control
Written by Flavio Adalberto Kubota   

Hello,

After discussion of my last post, I got a conclusion: open for edit always the latest version. And I did. I did this part as a plugin. I had some difficulty, because I am coding an extension and I can not modify the Joomla! core. But Ian helped me to find a solution.

Still about last post subject, I have been thiking about publishing a revision and it became the current. I talked to Ian a lot. I will probably implement in two ways for user tests.

As suggested, I did a nice functionality indicating what revision number a change comes from. I'm displaying this information in a bar, but I'm thinking to show it in a float box, like an acronym.
 

We are almost there. A basic version control component is working, not tested, but usable. I plan to make an installable package and make it available soon!

 
33 Votes

8 Comments

Feedback is requested
Version Control
Written by Flavio Adalberto Kubota   

I got some progress these weeks: Compare two differents versions and publish any version.
When you compare two versions, you can see what was changed between these two version. I'm doing this based in colors. Green color for added content, red for deleted and yellow for changed.
And an user can choose which version of the content he wish to publish. But because of this, to continue my work I need to make a choice and I need a feedback.
In editing content, I have two possibilities if implementation, the first is:

  • When a content is opened for editing, always is presented the lastest version.
  • Or edit the version that is publish.

Both options are viable. The first one, keep a sequencial logic, while the second, let the user edit what is displayed in the site. In the first case, to edit an old version, it would be necessary to recover this version to be the last version, and then edit.

Any feedback is appreciated to help me to choose which one to code.

Thank you for this and thank you for all comments in the blog.

 

 
40 Votes

7 Comments

Just coding
Version Control
Written by Flavio Adalberto Kubota   

During this last two week, I have imported my work in JoomlaCode SVN and wrote code.
I've fixed some bugs that I found in the code.
I've added the functionality of recover a specific version from database. I did a method that it is possible to build an old version from the diffs store in database.
Another feature I did, is that every time an article is saved, a version is generated and saved on database.
For the next step, I intend to write some tests and write the conflicts functionality.
 

 
34 Votes

4 Comments

Text diff, but it is not just text
Version Control
Written by Flavio Adalberto Kubota   

First, I would like to thank all that read Summer of Code blog and all that add comments here. It is nice to know that you are spending some minutes just to read the posts.
Peter Stumpf wrote about Version Control on JoomFish. This could be a future project after Summer of Code, because base of Version Control System will be done, it would be necessary to make changes to work with JoomFish.

About the Version Control, his week I have started to work with Joomla! source code. To learn about, I created a very simple component that prints a register of a table. In the beginning, I have some difficults to understand how Joomla! connect the layers of MVC model, but now it is more clear for me.
After this, I was going to copy the algorithms I wrote when I noticed that a important point about diffs. In text diff, the differences is shown based on the lines, in the other words, a text diff algorithm show differences between lines. But in html there is no lines, at least in html source. We can have just one line for all the html content. If there's no line, no advantage to save diffs. A solution I found consist in consider some tags as line. Html tags that browser print as one line, I will consider as a line. It was necessary to make an algorithm to interpret html e verify if a tag is a line.
Until now, I was writing basic algorithms for Version Control, but I haven't used JoomlaCode yet. This week, I will start use JoomlaCode SVN. Versioning my code will be important from now.

 

 
37 Votes

1 Comment

Longest Common Subsequence
Version Control
Written by Flavio Adalberto Kubota   

This week I've implemented an algorithm to show difference between two texts.
I've implement the LCS(Longest Common Sequence) algotithm. The Longest Common Sequence consist is finding the longest subsequence common to all sequences in a set of sequences. It is a NP-Hard problem but can be solved in psedo-polynomial time using dynamic programming.
But what LCS algorithm can be used on diff problem?
The best diff result is the set with less common sequence between two sets. And, LCS can find the longest common subsequence. With LCS result, we can compare to two input sets and check what was add and what was removed, finding a solution. But this last comparison is not necessary, using the matrix built with dynamic programming, it is possible to find the the diff solution.
There's an optimization for my code, but I'll do it later. First, I need to make thinks work.
I have implemented these functions separately. Now I will integrate to Joomla!


 

 
37 Votes

1 Comment

How to do
Version Control
Written by Flavio Adalberto Kubota   

This week I've been studying about how to save data on database because I am concerned about performance vs disc space. I have discussed about this with my mentor.
A choice could be store the whole content of each version. I have checked another software that use a version control system and all version are saved on database, but data is compressed. I did some tests on compression lib methods of PHP(zlib). I have tested three methods, but all results were similar. I got compression ration between about 50% and 60%. If there is a article of size 30k, and about 100 revisions, we got 3000k of data in a unique content without compression. In fact, I don't know how frequently an article is modified, but, in a large site, database size may increase fast. In the other hand, saving all data, to get any version is very fast, although large database do queries slower.
So, we thought about other alternatives. We agree in save only changes between versions.
I have studied about save only changes. I implemented a algorithm to apply a diff file to test performance. Apply many diffs in large contents may be slow. I will try to improve the algorithm but I can't improve asymptoticly. I have search some standards formats, and I think the normal format  may solve the problem. About database size, int the worst case, storing only changes is equal to store all data. But I think it is difficult to get the worst case. A disadvantage of this method is that there is a processing to get a specifically version. If we are is revision number 100 and we want get number 1, we have to apply 100 diff files on the content, once each diff is related to next version. To get performance, the data of published version and lastest version is also stored in database.

Another funcionality I've thinking is lock article and 'who is editing'. This funcionalities is just able with AJAX, and I'm thinking about this now to plan a database model. Also with AJAX, I planning autosave support, that save in a frequency but generate just one revision.
 

Well, I think planning is the most difficult part and the most important, many thing may depend of  how it was planned.

 
38 Votes

1 Comment

Studying, for now..
Version Control
Written by Flavio Adalberto Kubota   

My name is Flavio and I'll develop a version control system for article component.
I am new to the Joomla! community and I started with a little bit of history. I've read Joomla! hystory on wikipedia and I've been even more motivated after this.
In this last week I have studied Joomla!. I have read some articles from Joomla! Developers Documentation on http://docs.joomla.org/Developers. An important article that I want to cite is Coding style and standards, and I want to encourage my SoC colleagues to read it too.
I also have studied Joomla! database model. I want to alter database least as possible, and to keep database normalization. I want to create the version control system as a component and make installable to Joomla!. And after, it is possible to embed in the Joomla! core.
Version control system will create and manage revisions of article component. Version Control System log all changes when the document is saved, and make possible revert to any version. It is also possible to compare any different version.
In this first month, I will be focused on revision control functionality, and leave user interface for a later discuss. I am current studying this functionality.


Any feedback is appreciated.
I will post again soon..
 

 
36 Votes

2 Comments

<< Start < Prev 1 2 Next > End >>

Page 1 of 2