Re: [Pharo-users] Smalltalk Argument

2017-10-19 Thread itli...@schrievkrom.de
Hello Paulo,

its a problem to get Smalltalkers - simple as it is. I had contacts with
Smalltalkers who wanted to do Smalltalk-"only" jobs - thats impossible
to guarantee in a smaller company and perhaps a mind I would not expect
from Smalltalker.

And the point about "Main Development Language" ... well, the other
developers have also their "beloved" language and it would be a much
better idea to put their "loved" together with your "loved" language.

There are *very* good reason out there to write Windows FAT-Clients in
.NET languages or even Mac/Linux/Windows Clients with Xamarin/Microsoft
tools or even Java-world languages and HTML-Clients with some good
JS-libraries.

You have to have very good reasons (and this is NOT productivity) to
argue against this and tell the other developers, that you develop
superior solutions just because you are doing Smalltalk. This may be
true for very specific libraries (and thats not only Roassal) - not
available in other systems - but in the normal case, they will simply
win (because of the huge amount software written in other languages).

The only Smalltalk technology I found out to be worthwhile fighting for
(because other are not able to offer a similar solution) today is an
object oriented database (e.g. Gemstone/S).

Perhaps the Smalltalk community should concentrate on the idea to make
their technology open/accessable for other languages in an easy way.
This is especially true for database vendors.

Database vendors offering Java, C# and python object support and
Smalltalk as an integrated script language - that could be a very good
argument and a place where Smalltalk can survive.

So, the answer is: don't depend on the language, look for developers
working with more than one language and insert Smalltalk technology
where you *really* get benefit. And the area where Smalltalk is so much
better is getting smaller and smaller these days.


Marten


Am 19.10.2017 um 09:04 schrieb Paulo R. Dellani:
> Dear all,
> 
> after using Smalltalk for several years I developed a passion for the
> language (how not to?), and Pharo is just so great to develop with.
> So thank you guys for keeping this wonderful project running.
> 
> Unfortunately, it is not easy to always point out why Smalltalk
> should be employed as "main development language" in a team
> or for a project. In the last discussion of this sort I was confronted
> with the question "where are we going to get new smalltalk
> developers if our startup grows or if you go?". Well, I had no
> good answer to that. What would have you answered?
> 
> Cheers,
> 
> Paulo
> 
> 


-- 
Marten Feldtmann



Re: [Pharo-users] How do you develop for gemstone in open source tools (pharo)?

2017-06-22 Thread itli...@schrievkrom.de
Hello,

several ways to do programming under Gemstone.

I personally use Jade (under Linux using WINE) the whole time. No
support for git, but following the traditional browser concept of
Smalltalk.

Still missing some development point and has limitation - but for the
traditional developer a fast lane into Gemstone/S

Marten


Am 22.06.2017 um 23:16 schrieb Petr Fischer:
> Hello, I'm curious how _comfortably_ develop software for Gemstone, which is 
> the preferred/best way (and future)?
> 
> 1) tODE - OK, a decent amount of work was inserted to it to make it work 
> somehow. Decent tools with git support, a lot of windows (autolayouting 
> required), very basic inspector, based on obsolete Pharo3, no autocomplete, 
> weird auto code formating etc. :(
> Will the development continue (better inspectors, autocomplete, etc)?
> 
> 2) gt4gemstone - new project based on GT tools, great 
> playground/workspace/inspectors, running in latest Pharo, but again, just 
> basic browser, no autocompletion, no syntax coloring (so far), but modern way
> What is the plan? Write proper class browser and code editor again from 
> scratch?
> There is amazing new browser for Pharo, Calypso, which has remote browsing 
> capabilities (but probably different remoting/proxy layer than gt tools) - is 
> possible to utilize this project for remote Gemstone browsing in future?
> 
> 3) develop in Pharo, then deploy to Gemstone
> With some compatibility layers, there is possibility to develop 
> application/business logic in Pharo (with bare collections, dicts, containers 
> etc.) and then deploy code to Gemstone and test. Nice scenario, latest modern 
> dev tools (browsers, inspectors, versioning) from Pharo, but on the dev side 
> in Pharo, no transaction logic (test transaction logic with junit 
> impossible/not available etc.), also not compatible class library - so also 
> with drawbacks with different Smalltalk implementation chaos :(
> 
> I would very much like to get involved with Gemstone dev, but it scratches a 
> bit now.
> 
> Thanks! pf
> 


-- 
Marten Feldtmann



Re: [Pharo-users] Team programming with Smalltalk

2017-02-17 Thread itli...@schrievkrom.de
Am 17.02.2017 um 18:51 schrieb Esteban A. Maringolo:
> I've used ENVY for a couple of years, and marginally used Store. Store
> is nothing compared with ENVY, ENVY is far superior. Store is like
> Monticello, but as such it lacks the "Configuration Map" part of it,
> that is offered by Metacello in Pharo/Squeak/GemStone.
> 
> However I find ENVY to be too cumbersome for an agile way of working.

 And another point is, that the way of ENVYs thinking is also available
in the tools they offer for the developer (let it be VW 2.5.2 or
VASmalltalk). Same tools on all platforms.

 This way of thinking is also introduced in the kind of browsers you
have - which offers different ways of views on your projects.

 For me the most and strongest point in the ENVY-Browsers area is the
ApplicationBrowser. Its shows you only the part of the image of a
specific application (package) , which are new classes introduced by you
in this application (package) - but also all the extension methods you
added in this application (package) to classes. That means - programmers
can stay for the whole life of a project - in only this kind of
browsers. A wonderful way of viewing the image.

 Sadly this is gone or simply only badly implemented. E.g. in Pharo you
can select a package - fine, but to know, what has been extended in this
package ?. The name of the method categories also define in which
package this method is located in. Make a type error and the method goes
into a different package and you will not recognize it. Solutions born
by the idea: how can we make it simple to have a solution this evening -
and these solutions survive over the years.

 ENVY for the first time used ? Well I remember, that I was crazy about
this tool - all this versioning, prerequisites etc ... but now after 20
years ? I'm used to the tools available on the Smalltalk market - but
really nice versioning (with several platforms): ENVY is the way to go.

 And the original version had several user interactions implemented -
which have been defined by VASmalltalk (e.g. change the developer role
and make this or that in one click).

 ENVY is also the tool, where I have so much confidence with, because
over the last 20 years I've never seen crashes and data losses. A strong
point for a closed-source software repository.


Marten


-- 
Marten Feldtmann



Re: [Pharo-users] About Git

2017-01-15 Thread itli...@schrievkrom.de
I would give you many more "+" - if you wish - for your opinion:




Another point I would like to mention: keep the source code locally or
at least have an easy option to hold all source code locally.

I've seen so many times, that git or one of the other git repositories
are down - that's a very critical point.

I would like to have a local repository, where I can import external
packages and I work locally only.

I also have thought several times that it would be nice to have a SQLite
database holding all sources/packages. How much easier life would be
with that.

Other than that: I prefer my simple server directory holding monticello
packages - in the Gemstone/S area.

But I have to admit, that all the source code management stuff I've seen
since ENVY in the Smalltalk community are pretty poor stuff - and even
considering integrating git is not a step forward in terms of technical
improvements, but only in terms of marketing and mainstream technology.


Marten



Am 14.01.2017 um 18:44 schrieb werner kassens:
> Hi Dimitris,
> i as a simple user tend to think about these things in simple terms: i
> download a program, add something, upload my addition. lets take an
> upload step, _one_ simple step with monticello: i upload something once
> (git add), i upload it a second time (git commit), i upload it a third
> time (git push), i try to upload it a fourth time (pull request), only
> then i'm done (yes, there are possible shortcuts but so what). i'm sure
> all this makes sense for the seasoned coder, but i certainly won't learn
> that.  just as a small example how a user like me thinks
> about this.
> werner
> 



-- 
Marten Feldtmann



Re: [Pharo-users] Situation - Raspberry PI and Pharo + Squeak

2015-07-07 Thread itli...@schrievkrom.de
Hi,

thanks for all these explanations. I tested the versions you mentioned
below with both Pharo and Squeak.

Squeak-GUI (4.6) seems still to be three times faster than Pharo's GUI
(5.0) - but actually it's at least a Pharo version which has an
acceptable speed.

Marten

Am 05.07.2015 um 21:24 schrieb Attila Magyar:
 Hi Marten,
 
 Currently I'm using this this vm from here 
 
 http://www.mirandabanda.org/files/Cog/VM/VM.r3395/cogspurlinuxhtARM-15.26.3395.tgz
 
 with the latest Pharo 5 spur image from here
 
 http://files.pharo.org/image/50/latest-spur32.zip
 
 As far as I know, spur is a new memory manager but I'm not familiar with the
 details.
 
 There is also a stack vm that works with ordinary images, but it lacks JIT
 compilation therefore a lot slower than cog.
 
 Attila
 
 
 
 --
 View this message in context: 
 http://forum.world.st/Situation-Raspberry-PI-and-Pharo-Squeak-tp4835873p4835876.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 


-- 
Marten Feldtmann



[Pharo-users] Situation - Raspberry PI and Pharo + Squeak

2015-07-05 Thread itli...@schrievkrom.de
Hello,

can anyone summarize the situation of Squeak/Pharo under Raspberry PI at
the moment ?

What platform/version is working, which vm should be used and it should
be useable ... what is the difference of SPUR here etc 


Thanks,


-- 
Marten Feldtmann



Re: [Pharo-users] RESTful API with Pharo with Gemstones

2015-06-24 Thread itli...@schrievkrom.de
We go a very similiar way as Sebastian - but with our company need NOT
to build a Smalltalk-only system, but also offer support for several
other developers/languages.

We use

* Zinc REST

* Gemstone 3.2.6

We generate code to have:

* Swagger-UI and Swagger-Core support (currently 1.2)

Earlier the swagger stuff was also handled by Gemstone, but now we
create Gemstone-Code to write the Swagger-specs into the server filesystem.

Practically the swagger-core support has been working with C# (we had to
correct/change the template for source code generation).

We see now the need to go to Swagger 2.0, to stay near the development
master stream.

The whole system is working very stable - the only problem I have is a
10 MB limit on the Gemstone socket system - here the Zinc HTTP System
subsystem must be changed to get rid of this problem.


Marten

Am 23.06.2015 um 20:40 schrieb sergio_101:
 I have been a project coming up that I really onlyneed a restful  API on.
 
 The front end will  be first built on a mobile device(iOS )then back on
 possibly android, with a very stripped down web application.
 
 i would like to use pharo/gemstones as the database.
 
 is there a project out there that allows for such restful API
 development in pharo land? This would be so fun! 
 
 thanks


-- 
Marten Feldtmann



[Pharo-users] WebSocket and Proxying ...

2015-05-06 Thread itli...@schrievkrom.de
Hello,

I'm playing with WebSockets under Pharo4 and this works as expected -
when using Pharo4 alone (using the Zinc packages).

But I did not get it to work, when e.g. doing a proxying via nginx (I
did not check it with Apache).

Actually Pharo4 seems to receive some stuff, because the WebSocket of
Pharo4 stuff does not work as expected after first proxying attempts.

Has anyone experience with that ?

Marten




Re: [Pharo-users] WebSocket and Proxying ...

2015-05-06 Thread itli...@schrievkrom.de
Hmm, at least I managed, that Pharo answered every second request using
the echo example

Under Windows and nginx I added to the nginx configuration. My local
Pharo server is running under 127.0.0.1:4:

extract from nginx.conf:

http:{

map $http_upgrade $connection_upgrade {
default upgrade;
}

server {

 location /ws-echo {
   proxy_pass http://127.0.0.1:4/ws-echo ;
   proxy_http_version 1.1;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection $connection_upgrade;
 }
 location /ws-echo-client {
   proxy_pass http://127.0.0.1:4/ws-echo-client ;
 }

 }
}



Am 06.05.2015 um 10:20 schrieb Sven Van Caekenberghe:
 Marten,
 
 On 06 May 2015, at 10:15, itli...@schrievkrom.de wrote:

 Hello,

 I'm playing with WebSockets under Pharo4 and this works as expected -
 when using Pharo4 alone (using the Zinc packages).

 But I did not get it to work, when e.g. doing a proxying via nginx (I
 did not check it with Apache).

 Actually Pharo4 seems to receive some stuff, because the WebSocket of
 Pharo4 stuff does not work as expected after first proxying attempts.

 Has anyone experience with that ?

 Marten
 
 Proxying the WebSockets protocol is not easy, nor implemented everywhere, 
 like HTTP is. This makes sense if you think about it, a WebSocket connection 
 is a permanent connection, which takes resources, this is not something most 
 servers like.
 
 So it is more difficult.
 
 Did you see/try http://nginx.org/en/docs/http/websocket.html ?
 
 (I did not try it)
 
 Sven
 
 


-- 
Marten Feldtmann



Re: [Pharo-users] WebSocket and Proxying ...

2015-05-06 Thread itli...@schrievkrom.de
Good guess - but this does not help 

Marten

Am 06.05.2015 um 21:24 schrieb Sven Van Caekenberghe:
 Good that it works now, maybe your problem is that /ws-echo comes before and 
 maybe also matches /ws-echo-client ? But I am no nginx expert.
 
 Maybe you try serving and proxying it as /client-ws-echo ? Or switch the 
 order ?
 



-- 
Marten Feldtmann



Re: [Pharo-users] WebSocket and Proxying ...

2015-05-06 Thread itli...@schrievkrom.de
Ok, I managed to make it work somehow:

I removed the static file serving from Pharo and put the
ws-echo-client code to the file system and it is now handled by nginx.

Now only WebSocket stuff is done by Pharo and this seems to work without
problems.

That means: the mixture of static-stuff and websocket handling breaks
the system: browser (Firefox or Chrome or IE11) - nginx - Pharo

Not the solution I wanted, but at least a way to make WebSockets working
under Pharo ...

Marten



Am 06.05.2015 um 16:48 schrieb itli...@schrievkrom.de:
 Hmm, at least I managed, that Pharo answered every second request using
 the echo example
 
 Under Windows and nginx I added to the nginx configuration. My local
 Pharo server is running under 127.0.0.1:4:
 
 extract from nginx.conf:
 
 http:{
 
 map $http_upgrade $connection_upgrade {
 default upgrade;
 }
 
 server {
 
  location /ws-echo {
proxy_pass http://127.0.0.1:4/ws-echo ;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
  }
  location /ws-echo-client {
proxy_pass http://127.0.0.1:4/ws-echo-client ;
  }
 
  }
 }
 
 
 
 Am 06.05.2015 um 10:20 schrieb Sven Van Caekenberghe:
 Marten,

 On 06 May 2015, at 10:15, itli...@schrievkrom.de wrote:

 Hello,

 I'm playing with WebSockets under Pharo4 and this works as expected -
 when using Pharo4 alone (using the Zinc packages).

 But I did not get it to work, when e.g. doing a proxying via nginx (I
 did not check it with Apache).

 Actually Pharo4 seems to receive some stuff, because the WebSocket of
 Pharo4 stuff does not work as expected after first proxying attempts.

 Has anyone experience with that ?

 Marten

 Proxying the WebSockets protocol is not easy, nor implemented everywhere, 
 like HTTP is. This makes sense if you think about it, a WebSocket connection 
 is a permanent connection, which takes resources, this is not something most 
 servers like.

 So it is more difficult.

 Did you see/try http://nginx.org/en/docs/http/websocket.html ?

 (I did not try it)

 Sven


 
 


-- 
Marten Feldtmann



Re: [Pharo-users] Pharo 4 Playground open file menu

2015-05-03 Thread itli...@schrievkrom.de
Am 02.05.2015 um 23:28 schrieb p...@highoctane.be:
 When some sysadmin has to edit them on servers, you want them in .st files.
 
 No class. No IDE. Not too much Smalltalk.
 
 Just the DSL on an as needed to know basis to configure things.
 
 That's better that XML/YAML/JSON...
 
 So, that's the case.
 
 Startup scripts same story.
 

More or less the same use case as I have 


Marten

-- 
Marten Feldtmann



Re: [Pharo-users] Pharo and Pi

2015-03-19 Thread itli...@schrievkrom.de
I found the NB approach as a fresh breeth of air - beside all the
problems (I am/was not aware of).

 Marten

-- 
Marten Feldtmann



Re: [Pharo-users] Pharo and Pi

2015-03-18 Thread itli...@schrievkrom.de
As I posted on my blog yesterday: Pharo 3 is running.

Marten

Am 18.03.2015 um 15:35 schrieb Torsten Bergmann:
 Read about piCore this week which is a Tiny Core Linux
 for the Pi.
 
 As there is 
  - a quick bootable Pharo on top of TinyLinux (Mikes PharoNOS project) 
  - a Pharo that is runnable on Pi
 
 I wonder if anyone already did some experiments on booting directly 
 into Pharo on a pi. 
 
 Still a pi newbee I also would like to know how to get started to
 Pharo on Pi. Seems like the CI job is not available:
 
   https://ci.inria.fr/pharo-contribution/computer/RaspberryPi/ 
 
 Where to get started with Pharo on Pi these days? Any quick
 guide?
 
 Thx
 T.
 


-- 
Marten Feldtmann



Re: [Pharo-users] About Zinc http components

2014-10-07 Thread itli...@schrievkrom.de
There are some good C libraries out there, which are suitable to
connect programs with each other: a good example is 0MQ.

Marten

-- 
Marten Feldtmann



Re: [Pharo-users] About Zinc http components

2014-10-07 Thread itli...@schrievkrom.de
0MQ is not message queueing in the normal sense as known from all other
MQ tools/libraries.

0MQ is about networking in general ... and their introduction text with
all their examples is one of the best examples documentation I've ever
read in the area of practical networking. Even though one might not use
0MQ one should read their views about putting network patterns together
to form a distributed network of software nodes (in different languages).

For Smalltalk 0MQ is a wonderful library:

- because of the interactive character of Smalltalk you might run a 0MQ
   node and still can inspect the whole traffic. That's a thing other
   languages can dream of.

- due to the fact, that the whole communcation is done in an external
   thread you simply win Smalltalk CPU time (which is always needed).


Marten



Re: [Pharo-users] About Zinc http components

2014-10-07 Thread itli...@schrievkrom.de
0MQ is defined by its exported C interface ...


Am 07.10.2014 um 23:51 schrieb kilon alios:
 nope but it is made (unlike 0mq which is made in C++)  in C so its
 should be relative simple to wrap with NB or even TalkFFI. At least the
 parts that interest you. 
 



-- 
Marten Feldtmann



[Pharo-users] How to create a package via code correctly ?

2014-10-03 Thread itli...@schrievkrom.de
How can I create a package correctly via code ?

I tried stuff like

PackageOrganizer default registerPackageNamed: 'Keks4'

SystemOrganization addCategory: 'Keks4'

but the package does not appear in the browser.


Marten


-- 
Marten Feldtmann



Re: [Pharo-users] RDBMS Atomic Counter?

2014-04-17 Thread itli...@schrievkrom.de
I think this is simply a case of optimistic locking - there is a general
way and very often db specific ways

first you get the current active value ... (one row)

currentValue from select counterfield from tablename


then you update the table (single row)


update
  tablename
set
  counterfield = currentValue + 1
where
  counterfield = currentValue

commit

then you look how many rows have been changed (=1) and assume, that
commit was successful and then you know if you were successful ...
otherwise you must retry ...

this is a simple, with worst performance but portale approach ...

Marten


Am 16.04.2014 21:52, schrieb Esteban A. Maringolo:
 Hi,
 
 A few weeks ago Sven was asking for a lock-free in-image atomic counter.
 
 Today I'm in need of implementing a DB backed (PGSQL) counter for
 business forms numbering, and maybe there are some toughts you're
 willing to share :)
 
 I can't find any other way than a row lock for each counter, but maybe
 there is something better (I avoid locks as much as possible).
 
 Any thoughts to share here?
 
 Regards!
 


-- 
Marten Feldtmann



Re: [Pharo-users] Zinc HTTP server seems to convert always ...

2014-04-09 Thread itli...@schrievkrom.de
Am 09.04.2014 15:29, schrieb Sven Van Caekenberghe:
 Hi Marten,
 
 I will need (much) more detail, what are you trying to do that is not working 
 according to you ?
 
 As far as I know Zinc HTTP Components does the right thing and can be used 
 (configured) to do almost anything you want. It mostly depends on your mime 
 types and their charset options.
 

The browser sends UTF8 data and in my application code I get instances
of ZnStringEntity and the contained string is converted to (?) ISO8859-1
(?) or CP-1252 (?). This seems to be due to the fact, that the entity
instance always has a ZnUTF8Encoder to do the conversion.

I would like to have UTF8 everywhere ... without all these conversions ...

Marten



-- 
Marten Feldtmann



Re: [Pharo-users] Zinc HTTP server seems to convert always ...

2014-04-09 Thread itli...@schrievkrom.de
Ok, if the browser sends POST/PUT request with a JSON structure it also
sends charset = utf8 (in my case). That's ok, because for JSON this is
more or less the default charset.

Zinc now seems to notice, that UTF8 charset is needed and creates a
ZnStringEntity with an UTF8Encoder.

Now when my application tries to get the JSON string of that
ZnStringEntity and builds the structure out of that string - and the
strings are NOT UTF8, but converted to (?) ISO8859 ?


Marten


-- 
Marten Feldtmann



Re: [Pharo-users] Zinc HTTP server seems to convert always ...

2014-04-09 Thread itli...@schrievkrom.de
Ok, forget the JSON stuff - it has nothing to do with the problem.

Other way round:

My whole database and internal processing is done in UTF8. This is the
most important point here to mention.


Now the request comes into Zinc as mentioned below (the content of the
request is a JSON string only):

  HTML-Request (charset=UTF-8) =(sends)= ZINC HTTP

Now Zinc sees the content of the body, knows that it is coded in UTF8
and creates a ZnStringEntity with UTF8Encoder.

  Zinc HTTP =(builds)= ZnStringEntity (with UTF8Encoder)

The instance of ZnRequest and its entity value is an instance of
ZnStringEntity (with its encoder attribute is set to an instance to
ZnUTF8Encoder).

I checked the content of the string attribute of the ZnStringEntity and
this string is NOT encoded in UTF8 any more, but in either ISO8859-?
or WIN1252.

I think, that this is ok for almost all people, because they work with
some CodePages - but my internal processing assumes UTF8.

I just fixed this for me by changing ZnStringEntityinitializeEncoder
to ALWAYS set the encoder attribute to ZnNullEncoder and now everthing
is ok again. This means of course, that all apllication running with
that source code work in UTF 8 only ...

Marten

Am 09.04.2014 18:42, schrieb Sven Van Caekenberghe:
 Marten,
 
 On 09 Apr 2014, at 18:25, itli...@schrievkrom.de wrote:
 
 Ok, if the browser sends POST/PUT request with a JSON structure it also
 sends charset = utf8 (in my case). That's ok, because for JSON this is
 more or less the default charset.

 Zinc now seems to notice, that UTF8 charset is needed and creates a
 ZnStringEntity with an UTF8Encoder.

 Now when my application tries to get the JSON string of that
 ZnStringEntity and builds the structure out of that string - and the
 strings are NOT UTF8, but converted to (?) ISO8859 ?
 
 (NeoJSONReader fromString: 
   (ZnEntity with: (NeoJSONWriter toString: { #message - 'An der schönen 
 blauen Donau' } asDictionary)))
 at: #message.
 
 You must be doing something possibly wrong when you get the JSON string of 
 that ZnStringEntity and builds the structure out of that string (how do you 
 do that, BTW), so please write some code that demonstrates what is not right 
 according to you.
 
 Sven
 


-- 
Marten Feldtmann



Re: [Pharo-users] Zinc HTTP server seems to convert always ...

2014-04-09 Thread itli...@schrievkrom.de
And now the additional information: I'm working under Gemstone and I
noticed quite some differences between Pharo and its Gemstone port
of Zinc in this area ... I have to take a closer look here.

Marten


-- 
Marten Feldtmann



Re: [Pharo-users] neo json and valueSchema for integer attributes ...

2014-02-21 Thread itli...@schrievkrom.de
Hmm, I think that something is definitly missing here.

The same code but instead of using #AsString I use DateAndTime and it
works as expected - and that's what I would expect: use for that
property mapping a valueSchema named AsString.

It seems to work for all classes, when there is no predefined encoding
available in the running system:Integer has a mathod, DateAndTime not.

Is there any reason why is works that way ?

Marten





Am 21.02.2014 12:07, schrieb Sven Van Caekenberghe:
 
 On 21 Feb 2014, at 09:18, Norbert Hartl norb...@hartl.name wrote:
 
 Am 21.02.2014 um 07:50 schrieb itli...@schrievkrom.de:

 I have a class with an instance attribute x and this one contains an
 integer value.

 No when exporting this to json I want to write a string instead of this
 number to the json string ...

 neoJsonMapping: mapper
 mapper for: self do: [ :mapping |
   (mapping mapInstVar: #x to: 'x') valueSchema: #AsString.
 ].

 mapper for: #AsString customDo: [ :mapping |
   mapping encoder: [ :anInteger | x asString ].
   mapping decoder: [ :aString | ... ] ].

 But whatever I do ... only numbers are written out ... and yes of course
 I could add additional accessors doing the conversion.



-- 
Marten Feldtmann



[Pharo-users] neo json and valueSchema for integer attributes ...

2014-02-20 Thread itli...@schrievkrom.de
I have a class with an instance attribute x and this one contains an
integer value.

No when exporting this to json I want to write a string instead of this
number to the json string ...

neoJsonMapping: mapper
  mapper for: self do: [ :mapping |
(mapping mapInstVar: #x to: 'x') valueSchema: #AsString.
  ].

  mapper for: #AsString customDo: [ :mapping |
mapping encoder: [ :anInteger | x asString ].
mapping decoder: [ :aString | ... ] ].

But whatever I do ... only numbers are written out ... and yes of course
I could add additional accessors doing the conversion.

-- 
Marten Feldtmann



Re: [Pharo-users] Zinc as a proxy ?

2014-01-01 Thread itli...@schrievkrom.de
The main idea was:

 - Use Pharo as a headless server
 - Pharo serves files for a local user (one person application)
 - GUI is written in Sencha (js framework)
 - Pharo offers additonal (platform) REST-API's for this application
and is able to proxy requests for external services (to get
ONE-source targets for browser apps)
 - now put all stuff together via an installer and deliver this to
customers
 - GUI   is done via alredy installed browser.

The main concept has already be done by me via VASmalltalk (and jQuery
apps) - under Linux and windows - and it worked. (As an platform
REST-API I created a service for ZeroMQ for service detection and IPC
communication).

Now I want to switch to Pharo and Zinc (no need for Seaside any more) -
and be able to offer solutions for Mac, Linux and Windows.

That's were I would like to go ...

Thanks for your answer ...


Marten




[Pharo-users] Zinc as a proxy ?

2013-12-31 Thread itli...@schrievkrom.de
Can a Zinc http-server be used as a local proxy ? Had anyone done this ?


Marten Feldtmann