TF-Login to GLASS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

TF-Login to GLASS

Thelliez
Hello,

I have not tried this package: http://www.squeaksource.com/TFLogin/
but it seems to provide some important user account management
capabilities.

Naively attempting to load it into GLASS, dependencies such as
MailMessage (network-Url) and FileStream (Files-Kernel) are surfacing.

I have not previously attempted to port a package from Pharo to GLASS.
 How difficult/easy would it be to port such package?


Maybe a more generic question would be: how do you port something from
Pharo to GLASS?  Attempt to load the package, resolve the dependencies
by loading other packages, repeat?


Thanks,
Thierry
Reply | Threaded
Open this post in threaded view
|

Re: TF-Login to GLASS

NorbertHartl

Am 29.03.2011 um 02:26 schrieb Thierry Thelliez:

> Maybe a more generic question would be: how do you port something from
> Pharo to GLASS?  Attempt to load the package, resolve the dependencies
> by loading other packages, repeat?

I wouldn't expect to have dependency trouble. The package dependencies usually aren't that different in pharo and gemstone. Especially not on the level I assume TFLogin operates (thus meaning being a seaside component).

The first annoying thing you might encounter are syntax errors. There are some things you can do in pharo and that are not allowed in gemstone. These are a bit hard to fix if you don't know how to do it. But if you are lucky you can load it in gemstone as you would load it in pharo.

Use slime in pharo. That might give you some errors you can fix on the pharo side before starting to do he port.

The rest seems to be pretty easy. Your best bet is to have a good test coverage of the code. If you have the probabilty is quite high that a test triggers an error based on the difference between pharo and gemstone. So porting IMHO is best done if you do it like "just make it green again". The tests are also the best interface for ports not to diverge.

If you find errors just look at the code on both sides. IMHO the biggest source of trouble is: In pharo 'a' = #a is true in gemstone it is not. The same goes with Association, Dictionaries where equality is used in this context.

But if you have problems getting it to work just ask here on this list. If nobody will have a good answer Dale or James will :)

Norbert
Reply | Threaded
Open this post in threaded view
|

Re: TF-Login to GLASS

Thelliez
Thanks Paul,  that was very useful to get me started.


The code critic flagged only 1392 issues.. but most can be ignored.

TF-Login is well written and a great source for learning seaside UI
testing.  Unfortunately there are many dependencies that are going to
take a while to fix on GLASS.

For example there is a call to SHA1.  I could easily hack something to
call an external script with performOnServer:.  But having it inside
GLASS would be better for portability.

Also, I guess that most of the TF-Login database related code could be
simplified with GLASS.  Right now it is using Semaphors and Monitors
for r/w on file.


Thierry
Reply | Threaded
Open this post in threaded view
|

Re: TF-Login to GLASS

Thelliez
In reply to this post by NorbertHartl
John,

Thanks for the pointer.  It seem that TF-Login is using both
WAEmailMessage and MailMessage.   The later has support for multipart
emails


Thierry


On Wed, Mar 30, 2011 at 11:17 PM, Johan Brichau <[hidden email]> wrote:
> Mind that there is a WAEmailMessage included in Seaside, and therefore available in all dialects.
>
> If you want to make TFLogin portable, it's better that it uses WAEmailMessage.
>
> On 30 M
Reply | Threaded
Open this post in threaded view
|

Re: TF-Login to GLASS

Paul DeBruicker
In reply to this post by Thelliez
The part of the Squeak/Pharo Cryptography package that I ported to glass that actually works is the SHA1, SHA256, and HMAC stuff. So you should be all set in that regard.




On Mar 31, 2011, at 7:45 PM, Thierry Thelliez <[hidden email]> wrote:

> Thanks Paul,  that was very useful to get me started.
>
>
> The code critic flagged only 1392 issues.. but most can be ignored.
>
> TF-Login is well written and a great source for learning seaside UI
> testing.  Unfortunately there are many dependencies that are going to
> take a while to fix on GLASS.
>
> For example there is a call to SHA1.  I could easily hack something to
> call an external script with performOnServer:.  But having it inside
> GLASS would be better for portability.
>
> Also, I guess that most of the TF-Login database related code could be
> simplified with GLASS.  Right now it is using Semaphors and Monitors
> for r/w on file.
>
>
> Thierry
Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] TF-Login to GLASS

Mariano Martinez Peck



On Thu, Mar 31, 2011 at 8:50 PM, Paul DeBruicker <[hidden email]> wrote:
The part of the Squeak/Pharo Cryptography package that I ported to glass that actually works is the SHA1, SHA256, and HMAC stuff. So you should be all set in that regard.



Sorry for this old thread revival. But I need SHA1 to work in GemStone in order to test if OAuth works. The version I have loaded in my GemStone of SHA1 doesn't seem to work as it depends on Bitmap and things like that. Where can I find the version you ported?

Thanks in advance, 
 


On Mar 31, 2011, at 7:45 PM, Thierry Thelliez <[hidden email]> wrote:

> Thanks Paul,  that was very useful to get me started.
>
>
> The code critic flagged only 1392 issues.. but most can be ignored.
>
> TF-Login is well written and a great source for learning seaside UI
> testing.  Unfortunately there are many dependencies that are going to
> take a while to fix on GLASS.
>
> For example there is a call to SHA1.  I could easily hack something to
> call an external script with performOnServer:.  But having it inside
> GLASS would be better for portability.
>
> Also, I guess that most of the TF-Login database related code could be
> simplified with GLASS.  Right now it is using Semaphors and Monitors
> for r/w on file.
>
>
> Thierry



--
Mariano
http://marianopeck.wordpress.com
Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] TF-Login to GLASS

Paul DeBruicker
I think it's on GemSource. 



On Apr 18, 2014, at 10:01 AM, Mariano Martinez Peck <[hidden email]> wrote:




On Thu, Mar 31, 2011 at 8:50 PM, Paul DeBruicker <[hidden email]> wrote:
The part of the Squeak/Pharo Cryptography package that I ported to glass that actually works is the SHA1, SHA256, and HMAC stuff. So you should be all set in that regard.



Sorry for this old thread revival. But I need SHA1 to work in GemStone in order to test if OAuth works. The version I have loaded in my GemStone of SHA1 doesn't seem to work as it depends on Bitmap and things like that. Where can I find the version you ported?

Thanks in advance, 
 


On Mar 31, 2011, at 7:45 PM, Thierry Thelliez <[hidden email]> wrote:

> Thanks Paul,  that was very useful to get me started.
>
>
> The code critic flagged only 1392 issues.. but most can be ignored.
>
> TF-Login is well written and a great source for learning seaside UI
> testing.  Unfortunately there are many dependencies that are going to
> take a while to fix on GLASS.
>
> For example there is a call to SHA1.  I could easily hack something to
> call an external script with performOnServer:.  But having it inside
> GLASS would be better for portability.
>
> Also, I guess that most of the TF-Login database related code could be
> simplified with GLASS.  Right now it is using Semaphors and Monitors
> for r/w on file.
>
>
> Thierry



--
Mariano
http://marianopeck.wordpress.com
Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] TF-Login to GLASS

Mariano Martinez Peck



On Fri, Apr 18, 2014 at 2:08 PM, Paul DeBruicker <[hidden email]> wrote:

Thanks Paul. Ouch I tried a simple test:

((SHA1 new hmac key: (ByteArray new: 16 withAll: 16r0B); digestMessage: 'Hi There' asByteArray) asByteArray)

but still doesn't work :(

ThirtTwoBitRegister  >> += aThirtTwoBitRegister

is being call with a nil argument.

Does it work for you?

Thanks,
 
On Apr 18, 2014, at 10:01 AM, Mariano Martinez Peck <[hidden email]> wrote:




On Thu, Mar 31, 2011 at 8:50 PM, Paul DeBruicker <[hidden email]> wrote:
The part of the Squeak/Pharo Cryptography package that I ported to glass that actually works is the SHA1, SHA256, and HMAC stuff. So you should be all set in that regard.



Sorry for this old thread revival. But I need SHA1 to work in GemStone in order to test if OAuth works. The version I have loaded in my GemStone of SHA1 doesn't seem to work as it depends on Bitmap and things like that. Where can I find the version you ported?

Thanks in advance, 
 


On Mar 31, 2011, at 7:45 PM, Thierry Thelliez <[hidden email]> wrote:

> Thanks Paul,  that was very useful to get me started.
>
>
> The code critic flagged only 1392 issues.. but most can be ignored.
>
> TF-Login is well written and a great source for learning seaside UI
> testing.  Unfortunately there are many dependencies that are going to
> take a while to fix on GLASS.
>
> For example there is a call to SHA1.  I could easily hack something to
> call an external script with performOnServer:.  But having it inside
> GLASS would be better for portability.
>
> Also, I guess that most of the TF-Login database related code could be
> simplified with GLASS.  Right now it is using Semaphors and Monitors
> for r/w on file.
>
>
> Thierry



--
Mariano
http://marianopeck.wordpress.com



--
Mariano
http://marianopeck.wordpress.com
Reply | Threaded
Open this post in threaded view
|

Re: [GS/SS Beta] TF-Login to GLASS

Paul DeBruicker
I haven’t used it in years.  Wish I could be more help.





On Apr 18, 2014, at 10:36 AM, Mariano Martinez Peck <[hidden email]> wrote:

>
>
>
> On Fri, Apr 18, 2014 at 2:08 PM, Paul DeBruicker <[hidden email]> wrote:
> I think it's on GemSource.
>
> http://seaside.gemtalksystems.com/ss/Cryptography.html
>
>
>
> Thanks Paul. Ouch I tried a simple test:
>
> ((SHA1 new hmac key: (ByteArray new: 16 withAll: 16r0B); digestMessage: 'Hi There' asByteArray) asByteArray)
>
> but still doesn't work :(
>
> ThirtTwoBitRegister  >> += aThirtTwoBitRegister
>
> is being call with a nil argument.
>
> Does it work for you?
>
> Thanks,
>  
> On Apr 18, 2014, at 10:01 AM, Mariano Martinez Peck <[hidden email]> wrote:
>
>>
>>
>>
>> On Thu, Mar 31, 2011 at 8:50 PM, Paul DeBruicker <[hidden email]> wrote:
>> The part of the Squeak/Pharo Cryptography package that I ported to glass that actually works is the SHA1, SHA256, and HMAC stuff. So you should be all set in that regard.
>>
>>
>>
>> Sorry for this old thread revival. But I need SHA1 to work in GemStone in order to test if OAuth works. The version I have loaded in my GemStone of SHA1 doesn't seem to work as it depends on Bitmap and things like that. Where can I find the version you ported?
>>
>> Thanks in advance,
>>  
>>
>>
>> On Mar 31, 2011, at 7:45 PM, Thierry Thelliez <[hidden email]> wrote:
>>
>> > Thanks Paul,  that was very useful to get me started.
>> >
>> >
>> > The code critic flagged only 1392 issues.. but most can be ignored.
>> >
>> > TF-Login is well written and a great source for learning seaside UI
>> > testing.  Unfortunately there are many dependencies that are going to
>> > take a while to fix on GLASS.
>> >
>> > For example there is a call to SHA1.  I could easily hack something to
>> > call an external script with performOnServer:.  But having it inside
>> > GLASS would be better for portability.
>> >
>> > Also, I guess that most of the TF-Login database related code could be
>> > simplified with GLASS.  Right now it is using Semaphors and Monitors
>> > for r/w on file.
>> >
>> >
>> > Thierry
>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com