Quantcast

Any way to use dot syntax with 1.11?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Any way to use dot syntax with 1.11?

mrceolla
Hi,

We are attempting to upgrade from 1.7 to 1.11.  We used a lot of declarative markup in our site so we have thing like:

dojotype='dijit.form.Button'
data-dojo-type="dijit.form.ComboButton"

...all over the place.  I understand the new way is to do:

data-dojo-type="dijit/form/ComboButton"

Is there any way to allow the dot syntax to work in the newer dojo releases?

Second question...

We also used a lot of dojo.require() which I understand isn't used anymore.  Is there any way to allow dojo.require() to work in newer releases like it did in 1.7?

Are there any guides available on best practices when upgrading these older dojo releases with newer ones due to all of the changes which appears on the surface to require a TON of rewriting?

Thanks,
Mike
 
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Dylan Schiemann
Sent: Tuesday, February 21, 2017 8:37 AM
To: [hidden email]
Subject: Re: [Dojo-interest] deep lang.mixin

That sounds like a reasonable patch... If you open a ticket and a PR I can land that pretty quickly (we're aiming for updated point releases in early March).

Regards,
-Dylan

on 2/21/17, 07:06 (GMT-07:00) Michael Schall said the following:

> Dylan -
>
> I got pulled onto another project so I haven't looked into pulling in
> the dojo2 modules.  We did find an issue with the dojo1
> request/util/deepCopy.  It does not seem to support Date objects.
>
> I have updated the plunker
> (http://plnkr.co/edit/ebYbu9nQ5m3rAbyQbMP1?p=preview
> <http://plnkr.co/edit/ebYbu9nQ5m3rAbyQbMP1?p=preview>) showing a date
> property in the object structure.  We have also found a fix and have
> included the patch below and in the plunker example:
>
> Index: request/util.js
> ===================================================================
> --- request/util.js(revision 5861)
> +++ request/util.js(working copy)
> @@ -14,7 +14,11 @@
>  sval = source[name];
>  if(tval !== sval){
>  if(tval && typeof tval === 'object' && sval && typeof sval ===
> 'object'){ -exports.deepCopy(tval, sval);
> +if(sval instanceof Date){
> +target[name] = new Date(sval);
> +}else{
> +exports.deepCopy(tval, sval);
> +}
>  }else{
>  target[name] = sval;
>  }
>
> Let me know what you think?  Do I open a ticket for this?
>
> Mike
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Any way to use dot syntax with 1.11?

dylanks
Yes, but you need to use the synchronous loader instead of the async
loader which is slower. Make sure your configuration is async:false .

There are some migration guides in the docs, and there's a converter we
wrote that helps with the first 70-80% of the conversion which is
explained at
https://www.sitepen.com/blog/2013/04/03/introducing-dojo-amd-converter/

Regards,
-Dylan

on 3/9/17, 11:25 (GMT-07:00) Ceolla, Michael said the following:

> Hi,
>
> We are attempting to upgrade from 1.7 to 1.11.  We used a lot of declarative markup in our site so we have thing like:
>
> dojotype='dijit.form.Button'
> data-dojo-type="dijit.form.ComboButton"
>
> ...all over the place.  I understand the new way is to do:
>
> data-dojo-type="dijit/form/ComboButton"
>
> Is there any way to allow the dot syntax to work in the newer dojo releases?
>
> Second question...
>
> We also used a lot of dojo.require() which I understand isn't used anymore.  Is there any way to allow dojo.require() to work in newer releases like it did in 1.7?
>
> Are there any guides available on best practices when upgrading these older dojo releases with newer ones due to all of the changes which appears on the surface to require a TON of rewriting?
>
> Thanks,
> Mike
>  
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Dylan Schiemann
> Sent: Tuesday, February 21, 2017 8:37 AM
> To: [hidden email]
> Subject: Re: [Dojo-interest] deep lang.mixin
>
> That sounds like a reasonable patch... If you open a ticket and a PR I can land that pretty quickly (we're aiming for updated point releases in early March).
>
> Regards,
> -Dylan
>
> on 2/21/17, 07:06 (GMT-07:00) Michael Schall said the following:
>> Dylan -
>>
>> I got pulled onto another project so I haven't looked into pulling in
>> the dojo2 modules.  We did find an issue with the dojo1
>> request/util/deepCopy.  It does not seem to support Date objects.
>>
>> I have updated the plunker
>> (http://plnkr.co/edit/ebYbu9nQ5m3rAbyQbMP1?p=preview
>> <http://plnkr.co/edit/ebYbu9nQ5m3rAbyQbMP1?p=preview>) showing a date
>> property in the object structure.  We have also found a fix and have
>> included the patch below and in the plunker example:
>>
>> Index: request/util.js
>> ===================================================================
>> --- request/util.js(revision 5861)
>> +++ request/util.js(working copy)
>> @@ -14,7 +14,11 @@
>>  sval = source[name];
>>  if(tval !== sval){
>>  if(tval && typeof tval === 'object' && sval && typeof sval ===
>> 'object'){ -exports.deepCopy(tval, sval);
>> +if(sval instanceof Date){
>> +target[name] = new Date(sval);
>> +}else{
>> +exports.deepCopy(tval, sval);
>> +}
>>  }else{
>>  target[name] = sval;
>>  }
>>
>> Let me know what you think?  Do I open a ticket for this?
>>
>> Mike
>>
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Any way to use dot syntax with 1.11?

mrceolla
Thank you very much for the input.  We will investigate your suggestions.

Have a great day!

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Dylan Schiemann
Sent: Thursday, March 09, 2017 4:54 PM
To: [hidden email]
Subject: Re: [Dojo-interest] Any way to use dot syntax with 1.11?

Yes, but you need to use the synchronous loader instead of the async loader which is slower. Make sure your configuration is async:false .

There are some migration guides in the docs, and there's a converter we wrote that helps with the first 70-80% of the conversion which is explained at https://www.sitepen.com/blog/2013/04/03/introducing-dojo-amd-converter/

Regards,
-Dylan

on 3/9/17, 11:25 (GMT-07:00) Ceolla, Michael said the following:

> Hi,
>
> We are attempting to upgrade from 1.7 to 1.11.  We used a lot of declarative markup in our site so we have thing like:
>
> dojotype='dijit.form.Button'
> data-dojo-type="dijit.form.ComboButton"
>
> ...all over the place.  I understand the new way is to do:
>
> data-dojo-type="dijit/form/ComboButton"
>
> Is there any way to allow the dot syntax to work in the newer dojo releases?
>
> Second question...
>
> We also used a lot of dojo.require() which I understand isn't used anymore.  Is there any way to allow dojo.require() to work in newer releases like it did in 1.7?
>
> Are there any guides available on best practices when upgrading these older dojo releases with newer ones due to all of the changes which appears on the surface to require a TON of rewriting?
>
> Thanks,
> Mike
>  
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Dylan
> Schiemann
> Sent: Tuesday, February 21, 2017 8:37 AM
> To: [hidden email]
> Subject: Re: [Dojo-interest] deep lang.mixin
>
> That sounds like a reasonable patch... If you open a ticket and a PR I can land that pretty quickly (we're aiming for updated point releases in early March).
>
> Regards,
> -Dylan
>
> on 2/21/17, 07:06 (GMT-07:00) Michael Schall said the following:
>> Dylan -
>>
>> I got pulled onto another project so I haven't looked into pulling in
>> the dojo2 modules.  We did find an issue with the dojo1
>> request/util/deepCopy.  It does not seem to support Date objects.
>>
>> I have updated the plunker
>> (http://plnkr.co/edit/ebYbu9nQ5m3rAbyQbMP1?p=preview
>> <http://plnkr.co/edit/ebYbu9nQ5m3rAbyQbMP1?p=preview>) showing a date
>> property in the object structure.  We have also found a fix and have
>> included the patch below and in the plunker example:
>>
>> Index: request/util.js
>> ===================================================================
>> --- request/util.js(revision 5861)
>> +++ request/util.js(working copy)
>> @@ -14,7 +14,11 @@
>>  sval = source[name];
>>  if(tval !== sval){
>>  if(tval && typeof tval === 'object' && sval && typeof sval ===
>> 'object'){ -exports.deepCopy(tval, sval);
>> +if(sval instanceof Date){
>> +target[name] = new Date(sval);
>> +}else{
>> +exports.deepCopy(tval, sval);
>> +}
>>  }else{
>>  target[name] = sval;
>>  }
>>
>> Let me know what you think?  Do I open a ticket for this?
>>
>> Mike
>>
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Any way to use dot syntax with 1.11?

Earl Hood
In reply to this post by mrceolla
On Thu, Mar 9, 2017 at 12:25 PM, Ceolla, Michael wrote:

> We also used a lot of dojo.require() which I understand isn't used
> anymore.  Is there any way to allow dojo.require() to work in newer
> releases like it did in 1.7?

dojo.require should still work.

On the project I am on, we started with Dojo 1.2.3 and are now using Dojo
1.11.2.  The code base still uses the pre-AMD style since the effort to
convert it all to AMD style would be considerable.


> Are there any guides available on best practices when upgrading these
> older dojo releases with newer ones due to all of the changes which
> appears on the surface to require a TON of rewriting?

I recommend doing incremental updates:

  1.7 -> 1.8 -> 1.9 -> ...

In the history of our project, we have noticed behavior issues during Dojo
updates, so it may be more managable to gradually upgrade vs one giant leap.

--ewh
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Loading...