Sounds good, but may require more work to make sure all is good with the
RSS and Atom feeds as a result (which I believe rely on path). Where
path is used to check for equivalence, I guess name (and blog/website
ID, if necessary) alone will do now. We may need to check (if we aren't
already) that no two categories have the same name, where prior we were
checking that no two paths are the same (i.e., allowing category paths
USStates/Georgia and Countries/Georgia but now needing to disallow two
categories named "Georgia".)
Regards,
Glen
On 12/26/2013 12:47 AM, Gaurav wrote:
Hello Glen,
I am thinking of removing the path coloumn also, as it does not make
sense now as there will no subcategories and all will have same path
(like /categoryname). WDYT ?
Thanks
Gaurav
On Wednesday 25 December 2013 04:05 PM, Glen Mazza wrote:
Yes, the root category can be nuked.
Glen
On 12/25/2013 05:28 AM, Gaurav wrote:
Hello Glen,
I want to know as now all the categories will be top level, so the
root category which is created by default on addWeblog isn't needed.
So, I can remove that code also ? I am in half completed with the
1-2 steps will soon submit some patched in jira issue. You can look
on to them whenever you will get time from other projects.
Merry Christmas :)
Thanks
Gaurav
On Tuesday 24 December 2013 10:57 AM, Gaurav wrote:
Glen,
Thanks a lot for replying soon on this, I understand your
commitments. As this will give me more time on working on this
issue. I will give my 100% on this, as I also want to get into more
and more open source projects. For Now I am focusing on Roller for
starting my contributions in open source.
Thanks
Gaurav
On Tuesday 24 December 2013 10:51 AM, Glen Mazza wrote:
No, not a rush (unfortunately I can't help much right now either,
as my other project JSPWiki has a new release going out.) But
please be patient with us on your recent submitted patches -- we
haven't forgotten you and are happy with your efforts on this
project so far, we just have full-time jobs and, even after that,
other obligations -- for open source work, we usually have to beg,
borrow and steal time to work on them.
Glen
On 12/24/2013 12:05 AM, Gaurav wrote:
Hello Glen,
I am going through this having some issues, although not major
till now. I have still working on 1-2 steps, might be I am slow
as get less time. (Wish we also have holidays of this festive
season in India :P) Just want to know isn't there any hurry for
completing this asap ? Although, I am sure will definitely
complete this as I have understood the structure of Roller
completely. Just I have to go through the JPA more and read about
this.
Thanks
Gaurav
On Saturday 21 December 2013 04:59 PM, Glen Mazza wrote:
Looking good. Anything you're missing will become apparent to
you as you work along. The Roller installation guide and here
(http://www.jroller.com/gmazza/entry/apache_derby_setup) can
show you how to test also with Derby if you'd like. (It is
usually simpler than MySQL, and another benefit of working on
Roller is that you become multiple-database-lingual very quickly.)
Glen
On 12/21/2013 06:16 AM, Gaurav wrote:
Hello Glen,
Thanks for helping in this and I with this much deep
information, I can start working in it. I have started working
on this Issue and have followed your steps.
1. Created a new table in createdb.vm and in migration scripts
also. I have for mow stared working on MySQL.
2. In JPAWeblogEntryManagerImpl class, I have commented
updatePathTree and getRootWeblogCategory methods
3. I have created a new file for now Category.orm.xml and
enterd details of new table. A new class Category in
weblogger/pojos.
I have created new files for now and will work on this and add
new position coloum and code regarding this. Other than UI and
template Layer, I think I have covered all files on which I
have to work on the Database and JPA layers ? Please tell me if
I am wrong anywhere or following wrong workflow.
Thanks
Gaurav
On Saturday 21 December 2013 04:59 AM, Glen Mazza wrote:
Hi Gaurav, we use Velocity for our database scripts -- you see
a createdb.vm plus migration scripts (5.0 to 5.1) -- we'll
want our change in both places (IIRC), new users have the
createdb run and Roller upgraders with their current DB's have
the 5.0 to 5.1 migration script run.
We have multiple issues here and I'd like to get this done
right (I plan on helping out where you'd like). Namely, we've
moved from a hierarchical category structure (categories
having subcategories having their own subcatorgories etc.) to
a flat single-level structure (all categories are top level)
-- that was done a week or so back. Problem is, the database
tables are still assuming hierarchical (they will work with
flat structures but are overkill--we don't need a parent ID
column anymore.) Also, the JPA objects are designed for
hierarchical but can simplified a bit more to flat structure.
Incidentally, "sequenceNum" is ambiguous about what it means,
I would say "position" or "ordering" (INT null, null for
migrators who don't yet have a position defined) is clearer.
I think the simplest way to handle this--for both new
installers and upgraders--is:
1.) Database: To create a new table, say "category" designed
precisely as we need, and have the migration scripts select
from the old weblogcategory and insert into the new category
table. (We then ignore the weblogcategory table.) We'll need
to test the scripts with at least two databases (2 of probably
MySQL, Derby and/or PostgreSQL) and guess for the others--if
we're wrong the user community can supply a patch fixing it.
2.) JPA: The JPA persistence object (the old WeblogCategory)
will need simplifying/restructuring as it's now flat-level.
Indeed, I think things will get a *lot* simpler here, as it
may just be the parent Weblog holding a list of some sort of
Category objects--that's it.
3.) UI Layer: The category.jsp (or whatever it's called) and
its Struts action class will now need to use the new Category
object (and table) instead of WeblogCategory. The UI page will
need two changes: (1) all new categories will be placed (and
saved) at the bottom of the category list (and as result,
appear last (right-most) in the category list, and, later (2)
probably have up and down buttons in the table allowing users
to easily reorder the categories as they like. (Strictly
speaking, 1 alone is all that's needed for ordering, as you
can remove/name/delete/recreate categories to eventually get
them in the position you'd like, but (2) of course is much
nicer.)
4.) Template layer (haven't looked into this): The templates
(probably just a macro or two) will need updating to ensure
that they output the category names per the new position order.
It's a lot of work, but one advantage is that I'd like to do
the same thing with bookmarks/blogrolls (team discussion
pending...), switch from a hierarchical to flat-level for
those too. If we can do this for categories, the logic/UI
design, etc., will carry over 100% to bookmarks.
I was planning on eventually getting to this myself, so am
available to work with you on whatever parts you'd like. I
think going in order 1-2-3-4 and having separate commits may
be the cleanest way of doing this. What's nice about using a
brand new table and JPA object is that the old objects can
still work in the code while we're creating the new, we just
don't activate the new until the very end.
WDYT? (Also, other team members on the above ideas...?) Or
are there other Roller tasks you'd like to sink your teeth
into instead? I can look at this otherwise, but this looks
like a very good exercise for someone wanting to get more
involved in Roller, as it covers all the layers of the webapp.
Regards,
Glen
On 12/20/2013 10:43 AM, Gaurav wrote:
Hello,
I have started working on ROL-1981, as discussed in previous
discussion threads I will add new column sequenceNum in
weblogcategory table. Then we can assign sequenceNum to each
category according to websideid. If anyone have some ideas
regarding this, please help me. Also, need some help on how
to go with this issue, and how to add new coloum, I found
.sql file, do I need to add there new column. Also, Is this
possible that that when I restart the roller it will add new
column to database ?
Thanks for Any ideas/help.
[1] - https://issues.apache.org/jira/browse/ROL-1981