[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1639: fixes to get ajax return on periods

revision-diff.txt (1.56 KB)

don’t blame me for those extra spaces in the diff that’s being shown

I’m using the code style which Bob gave :wink: … and that applied those extra spaces

···

Regards,
Saptarshi PURKAYASTHA

Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 12 March 2010 13:04, noreply@launchpad.net wrote:


revno: 1639

committer: Saptarshi sunbiz@gmail.com

branch nick: trunk

timestamp: Fri 2010-03-12 13:03:07 +0100

message:

fixes to get ajax return on periods

modified:

dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.

=== modified file ‘dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml’

— dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2010-02-01 15:30:27 +0000

+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2010-03-12 12:03:07 +0000

@@ -145,7 +145,7 @@

            <action name="getPeriodsForLock"

                    class="org.hisp.dhis.dataadmin.action.lock.GetPeriodsForLockAction">

                    <result name="success" type="velocity">
  •                           /dhis-web-commons/ajax/responsePeriod.vm</result>
    
  •                           /dhis-web-commons/ajax/xmlPeriods.vm</result>
    
                      <param name="onExceptionReturn">plainTextError</param>
    
              </action>
    

@@ -307,8 +307,8 @@

            <action name="mergeOrganisationUnits"

                    class="org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction">

                    <result name="success" type="redirect">
  •                           displayOrganisationUnitMergeForm.action</result>
    
  •           </action>
    
  •                           displayOrganisationUnitMergeForm.action</result>
    
  •           </action>
    
    
    
              <!-- Duplicate data elimination -->
    

@@ -322,9 +322,9 @@

            <action name="eliminateDuplicateData"

                    class="org.hisp.dhis.dataadmin.action.duplicatedataelimination.EliminateDuplicateDataAction">

                    <result name="success" type="redirect">
  •            displayDuplicateDataEliminationForm.action</result>
    
  •            displayDuplicateDataEliminationForm.action</result>
    
              </action>
    
            <!-- Data Element Zero Value Storage Management -->



            <action name="zeroValueStorageManagement"

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

don't blame me for those extra spaces in the diff that's being shown
I'm using the code style which Bob gave :wink: ... and that applied those extra
spaces

Good to have someone to blame :slight_smile: BTW I don't think I changed what
netbeans does to xml formatting. But having said that, the real style
problem below is the fact that you have all that whitespace in
character data which shouldn't be there. I suspect it would be better
as:

<action name="emptyOrgunitSetupAssociationsTree"
class="org.hisp.dhis.commons.action.NoAction">
      <result
    name="success"
    type="velocity">/dhis-web-maintenance-dataadmin/noResponseInFrame.vm</result>
      <param
    name="javascripts">javascript/oust.js,javascript/associations.js,javascript/locking.js</param>
</action>

Netbeans generally doesn't seem too smart about xml formatting.

Cheers
Bob

···

On 12 March 2010 12:10, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:

---
Regards,
Saptarshi PURKAYASTHA
Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 12 March 2010 13:04, <noreply@launchpad.net> wrote:

------------------------------------------------------------
revno: 1639
committer: Saptarshi <sunbiz@gmail.com>
branch nick: trunk
timestamp: Fri 2010-03-12 13:03:07 +0100
message:
fixes to get ajax return on periods
modified:

dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml

--
lp:dhis2
trunk : Code : DHIS

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription\.

=== modified file
'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
---
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
2010-02-01 15:30:27 +0000
+++
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
2010-03-12 12:03:07 +0000
@@ -145,7 +145,7 @@
<action name="getPeriodsForLock"

class="org.hisp.dhis.dataadmin.action.lock.GetPeriodsForLockAction">
<result name="success" type="velocity">
-
/dhis-web-commons/ajax/responsePeriod.vm</result>
+
/dhis-web-commons/ajax/xmlPeriods.vm</result>
<param
name="onExceptionReturn">plainTextError</param>
</action>

@@ -307,8 +307,8 @@
<action name="mergeOrganisationUnits"

class="org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction">
<result name="success" type="redirect">
-
displayOrganisationUnitMergeForm.action</result>
- </action>
+
displayOrganisationUnitMergeForm.action</result>
+ </action>

           &lt;\!\-\- Duplicate data elimination \-\-&gt;

@@ -322,9 +322,9 @@
<action name="eliminateDuplicateData"

class="org.hisp.dhis.dataadmin.action.duplicatedataelimination.EliminateDuplicateDataAction">
<result name="success" type="redirect">
- displayDuplicateDataEliminationForm.action</result>
+ displayDuplicateDataEliminationForm.action</result>
</action>
-
+
<!-- Data Element Zero Value Storage Management -->

           &lt;action name=&quot;zeroValueStorageManagement&quot;

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

While we are the point of talking about formatting and white-space...
One thing we should consider is atleast changing the style of
javascript to be more concise.

Javascript is loaded as it is without any obfuscation and all browsers
spend their greatest resource in JIT to optimise javascript code of
which creating tokens can be speed up by reducing lines of code. Also
download time will decrease... Bob, do you think there is a need for
MOP in JavaScript atleast??

···

---
Regards,
Saptarshi PURKAYASTHA
Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 12 March 2010 14:14, Bob Jolliffe <bobjolliffe@gmail.com> wrote:

On 12 March 2010 12:10, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:

don't blame me for those extra spaces in the diff that's being shown
I'm using the code style which Bob gave :wink: ... and that applied those extra
spaces

Good to have someone to blame :slight_smile: BTW I don't think I changed what
netbeans does to xml formatting. But having said that, the real style
problem below is the fact that you have all that whitespace in
character data which shouldn't be there. I suspect it would be better
as:

<action name="emptyOrgunitSetupAssociationsTree"
class="org.hisp.dhis.commons.action.NoAction">
<result
name="success"
type="velocity">/dhis-web-maintenance-dataadmin/noResponseInFrame.vm</result>
<param
name="javascripts">javascript/oust.js,javascript/associations.js,javascript/locking.js</param>
</action>

Netbeans generally doesn't seem too smart about xml formatting.

Cheers
Bob

---
Regards,
Saptarshi PURKAYASTHA
Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 12 March 2010 13:04, <noreply@launchpad.net> wrote:

------------------------------------------------------------
revno: 1639
committer: Saptarshi <sunbiz@gmail.com>
branch nick: trunk
timestamp: Fri 2010-03-12 13:03:07 +0100
message:
fixes to get ajax return on periods
modified:

dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml

--
lp:dhis2
trunk : Code : DHIS

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription\.

=== modified file
'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
---
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
2010-02-01 15:30:27 +0000
+++
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
2010-03-12 12:03:07 +0000
@@ -145,7 +145,7 @@
<action name="getPeriodsForLock"

class="org.hisp.dhis.dataadmin.action.lock.GetPeriodsForLockAction">
<result name="success" type="velocity">
-
/dhis-web-commons/ajax/responsePeriod.vm</result>
+
/dhis-web-commons/ajax/xmlPeriods.vm</result>
<param
name="onExceptionReturn">plainTextError</param>
</action>

@@ -307,8 +307,8 @@
<action name="mergeOrganisationUnits"

class="org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction">
<result name="success" type="redirect">
-
displayOrganisationUnitMergeForm.action</result>
- </action>
+
displayOrganisationUnitMergeForm.action</result>
+ </action>

           &lt;\!\-\- Duplicate data elimination \-\-&gt;

@@ -322,9 +322,9 @@
<action name="eliminateDuplicateData"

class="org.hisp.dhis.dataadmin.action.duplicatedataelimination.EliminateDuplicateDataAction">
<result name="success" type="redirect">
- displayDuplicateDataEliminationForm.action</result>
+ displayDuplicateDataEliminationForm.action</result>
</action>
-
+
<!-- Data Element Zero Value Storage Management -->

           &lt;action name=&quot;zeroValueStorageManagement&quot;

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

While we are the point of talking about formatting and white-space...
One thing we should consider is atleast changing the style of
javascript to be more concise.

Javascript is loaded as it is without any obfuscation and all browsers
spend their greatest resource in JIT to optimise javascript code of
which creating tokens can be speed up by reducing lines of code. Also
download time will decrease... Bob, do you think there is a need for
MOP in JavaScript atleast??

Never heard of MOP till 5 minutes ago so not sure I'm the best person
to answer this. Mind you I have taken a quick look and it looks very
interesting and I can see quite useful when you have to synchronize
complex asynchronous interactions. Have you used it for anything?

In general I suspect we need to at some point gather up all our
javascript stuff and take a good look at it. We are probably much
more organised on the java side than the javascript side. Like many
things I guess it has evolved over time using different styles and
different libraries. There seems to be a gravitation towards jquery
but with some flirtation with ext particulalrly for the gis stuff.
And some standardizing on FCKEditor for our rich text components. It
would be nice to have a sort of dhis javascript api which is
consistent in style and maintainable over time. And which would also
be easier to focus optimization efforts. I don't really see much
point in obfuscation as such, but certainly there may be a case for
producing deployment versions of our javascript which is pre-processed
to optimize on white space use and the like. I know there is a range
of minification utilities out there. I guess challenge would be to be
able to integrate this into the maven processes on packaging the
web-portal project.

But I think I should leave that to the javascript gurus like yourself,
Nimrata, Viet, Jan and company.

Cheers
Bob

···

On 12 March 2010 14:36, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:

---
Regards,
Saptarshi PURKAYASTHA
Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 12 March 2010 14:14, Bob Jolliffe <bobjolliffe@gmail.com> wrote:

On 12 March 2010 12:10, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:

don't blame me for those extra spaces in the diff that's being shown
I'm using the code style which Bob gave :wink: ... and that applied those extra
spaces

Good to have someone to blame :slight_smile: BTW I don't think I changed what
netbeans does to xml formatting. But having said that, the real style
problem below is the fact that you have all that whitespace in
character data which shouldn't be there. I suspect it would be better
as:

<action name="emptyOrgunitSetupAssociationsTree"
class="org.hisp.dhis.commons.action.NoAction">
<result
name="success"
type="velocity">/dhis-web-maintenance-dataadmin/noResponseInFrame.vm</result>
<param
name="javascripts">javascript/oust.js,javascript/associations.js,javascript/locking.js</param>
</action>

Netbeans generally doesn't seem too smart about xml formatting.

Cheers
Bob

---
Regards,
Saptarshi PURKAYASTHA
Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 12 March 2010 13:04, <noreply@launchpad.net> wrote:

------------------------------------------------------------
revno: 1639
committer: Saptarshi <sunbiz@gmail.com>
branch nick: trunk
timestamp: Fri 2010-03-12 13:03:07 +0100
message:
fixes to get ajax return on periods
modified:

dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml

--
lp:dhis2
trunk : Code : DHIS

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription\.

=== modified file
'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
---
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
2010-02-01 15:30:27 +0000
+++
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
2010-03-12 12:03:07 +0000
@@ -145,7 +145,7 @@
<action name="getPeriodsForLock"

class="org.hisp.dhis.dataadmin.action.lock.GetPeriodsForLockAction">
<result name="success" type="velocity">
-
/dhis-web-commons/ajax/responsePeriod.vm</result>
+
/dhis-web-commons/ajax/xmlPeriods.vm</result>
<param
name="onExceptionReturn">plainTextError</param>
</action>

@@ -307,8 +307,8 @@
<action name="mergeOrganisationUnits"

class="org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction">
<result name="success" type="redirect">
-
displayOrganisationUnitMergeForm.action</result>
- </action>
+
displayOrganisationUnitMergeForm.action</result>
+ </action>

           &lt;\!\-\- Duplicate data elimination \-\-&gt;

@@ -322,9 +322,9 @@
<action name="eliminateDuplicateData"

class="org.hisp.dhis.dataadmin.action.duplicatedataelimination.EliminateDuplicateDataAction">
<result name="success" type="redirect">
- displayDuplicateDataEliminationForm.action</result>
+ displayDuplicateDataEliminationForm.action</result>
</action>
-
+
<!-- Data Element Zero Value Storage Management -->

           &lt;action name=&quot;zeroValueStorageManagement&quot;

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

:wink: To refresh your memory: Re: Netbeans code style : Mailing list archive : dhis2-devs team in Launchpad
Here you talk about Money-Oriented Programming (MOP)

···

On 12 March 2010 16:17, Bob Jolliffe <bobjolliffe@gmail.com> wrote:

Never heard of MOP till 5 minutes ago so not sure I'm the best person
to answer this.

---
Regards,
Saptarshi PURKAYASTHA
Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

Never heard of MOP till 5 minutes ago so not sure I'm the best person
to answer this.

:wink: To refresh your memory: Re: Netbeans code style : Mailing list archive : dhis2-devs team in Launchpad
Here you talk about Money-Oriented Programming (MOP)

Ah. I thought you were being smart and talking about something like
this (http://osteele.com/archives/2008/04/three-small-javascript-libraries\).
Which seemed quite interesting - if a bit beyond me.

You mean my MOP? I should have trademarked that (along with
'computational masturbation' and other useful computer terms). Well I
guess all my comments on minification apply :slight_smile:

Cheers
Bob

···

On 12 March 2010 15:26, Saptarshi Purkayastha <sunbiz@gmail.com> wrote:

On 12 March 2010 16:17, Bob Jolliffe <bobjolliffe@gmail.com> wrote:

---
Regards,
Saptarshi PURKAYASTHA
Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE