Re: Who uses ERDirectToRest ?

2012-07-16 Thread Schoenenberger Dominique
That's very useful ! Thanks everyone ! 

Dominique

On Jul 14, 2012, at 12:59 AM, Pascal Robert wrote:

> 
> Le 2012-07-13 à 17:21, Farrukh Ijaz a écrit :
> 
>>> AFAIK, nobody use it, except maybe Anjo. Using the "routes" based API in 
>>> ERRest in quite easy, but I do agree that being able to use D2W rules 
>>> instead of ERXKeyFilter to decide what is going to be send or accepted 
>>> would be cool.
>> 
>> One can use following methods in the Route Controller class. I have create a 
>> BaseRouteController and defined all useful methods in it.
> 
> Thanks. I added it to the wiki:
> 
> http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-UsingD2WruleswithERRest
> 
>> Farrukh
>> 
>> private D2WContext d2wContext;
>> 
>> protected D2WContext d2wContext() {
>>  if (d2wContext == null) {
>>  d2wContext = new D2WContext();
>>  }
>>  return d2wContext;
>> }
>> 
>> synchronized public NSArray inferFilterKeysForEntity(String 
>> entityName) {
>>  EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
>>  d2wContext().setEntity(entity);
>>  d2wContext().setTask(request().method());
>>  return (NSArray) 
>> d2wContext().inferValueForKey("displayPropertyKeys");
>> }
>> 
>> synchronized public NSArray inferFilterKeysForPage(String page) {
>>  d2wContext().setDynamicPage(page);
>>  d2wContext().setTask(request().method());
>>  return (NSArray) 
>> d2wContext().inferValueForKey("displayPropertyKeys");
>> }
>> 
>> public ERXKeyFilter showFilter(String entityName) {
>>  NSArray keys = inferFilterKeysForEntity(entityName);
>>  ERXKeyFilter filter = null;
>>  if (keys != null && !keys.isEmpty()) {
>>  filter = ERXKeyFilter.filterWithNone();
>>  for (String key : keys) {
>>  filter.include(new ERXKey(key));
>>  }
>>  } else {
>>  filter = 
>> ERXKeyFilter.filterWithAttributesAndToOneRelationships();
>>  }
>>  return filter;
>> }
>> 
>> 
>> The D2WRule should be something like:
>> 
>> LHS: entity.name = 'Employee' and task = 'GET'
>> RHS: displayPropertyKeys = ('firstName', 'lastName', 'position')
>> 
>>> 
 I've just started to use REST with our business logic. 
 
 I wanted to use ERDirectToRest because it seems very interesting to 
 quickly delivery access to the business logic but there are a lot of 
 warning to NOT use it:
 - In the read me: "This framework uses the old and deprecated REST APIs, 
 avoid using it."
 - Classes are deprecated
 
 So my questions: 
 - Can this framework be used ? 
 - Does anybody use it ? 
 - What people use instead ?
 
 Dominique
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
 
 This email sent to prob...@macti.ca
>>> 
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
>>> 
>>> This email sent to farrukh.i...@fuegodigitalmedia.com
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>> 
>> This email sent to prob...@macti.ca
> 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Who uses ERDirectToRest ?

2012-07-13 Thread Pascal Robert
And your presentation at WOWODC was your first direct contribution!

> Thanks Pascal for adding it to WIKI. My first indirect community contribution 
> :)
> 
> Farrukh
> 
> On 2012-07-14, at 1:59 AM, Pascal Robert  wrote:
> 
>> 
>> Le 2012-07-13 à 17:21, Farrukh Ijaz a écrit :
>> 
 AFAIK, nobody use it, except maybe Anjo. Using the "routes" based API in 
 ERRest in quite easy, but I do agree that being able to use D2W rules 
 instead of ERXKeyFilter to decide what is going to be send or accepted 
 would be cool.
>>> 
>>> One can use following methods in the Route Controller class. I have create 
>>> a BaseRouteController and defined all useful methods in it.
>> 
>> Thanks. I added it to the wiki:
>> 
>> http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-UsingD2WruleswithERRest
>> 
>>> Farrukh
>>> 
>>> private D2WContext d2wContext;
>>> 
>>> protected D2WContext d2wContext() {
>>> if (d2wContext == null) {
>>> d2wContext = new D2WContext();
>>> }
>>> return d2wContext;
>>> }
>>> 
>>> synchronized public NSArray inferFilterKeysForEntity(String 
>>> entityName) {
>>> EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
>>> d2wContext().setEntity(entity);
>>> d2wContext().setTask(request().method());
>>> return (NSArray) 
>>> d2wContext().inferValueForKey("displayPropertyKeys");
>>> }
>>> 
>>> synchronized public NSArray inferFilterKeysForPage(String page) {
>>> d2wContext().setDynamicPage(page);
>>> d2wContext().setTask(request().method());
>>> return (NSArray) 
>>> d2wContext().inferValueForKey("displayPropertyKeys");
>>> }
>>> 
>>> public ERXKeyFilter showFilter(String entityName) {
>>> NSArray keys = inferFilterKeysForEntity(entityName);
>>> ERXKeyFilter filter = null;
>>> if (keys != null && !keys.isEmpty()) {
>>> filter = ERXKeyFilter.filterWithNone();
>>> for (String key : keys) {
>>> filter.include(new ERXKey(key));
>>> }
>>> } else {
>>> filter = 
>>> ERXKeyFilter.filterWithAttributesAndToOneRelationships();
>>> }
>>> return filter;
>>> }
>>> 
>>> 
>>> The D2WRule should be something like:
>>> 
>>> LHS: entity.name = 'Employee' and task = 'GET'
>>> RHS: displayPropertyKeys = ('firstName', 'lastName', 'position')
>>> 
 
> I've just started to use REST with our business logic. 
> 
> I wanted to use ERDirectToRest because it seems very interesting to 
> quickly delivery access to the business logic but there are a lot of 
> warning to NOT use it:
> - In the read me: "This framework uses the old and deprecated REST APIs, 
> avoid using it."
> - Classes are deprecated
> 
> So my questions: 
> - Can this framework be used ? 
> - Does anybody use it ? 
> - What people use instead ?
> 
> Dominique
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> 
> This email sent to prob...@macti.ca
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
 
 This email sent to farrukh.i...@fuegodigitalmedia.com
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>>> 
>>> This email sent to prob...@macti.ca
>> 
> 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Who uses ERDirectToRest ?

2012-07-13 Thread Farrukh Ijaz
Thanks Pascal for adding it to WIKI. My first indirect community contribution :)

Farrukh

On 2012-07-14, at 1:59 AM, Pascal Robert  wrote:

> 
> Le 2012-07-13 à 17:21, Farrukh Ijaz a écrit :
> 
>>> AFAIK, nobody use it, except maybe Anjo. Using the "routes" based API in 
>>> ERRest in quite easy, but I do agree that being able to use D2W rules 
>>> instead of ERXKeyFilter to decide what is going to be send or accepted 
>>> would be cool.
>> 
>> One can use following methods in the Route Controller class. I have create a 
>> BaseRouteController and defined all useful methods in it.
> 
> Thanks. I added it to the wiki:
> 
> http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-UsingD2WruleswithERRest
> 
>> Farrukh
>> 
>> private D2WContext d2wContext;
>> 
>> protected D2WContext d2wContext() {
>>  if (d2wContext == null) {
>>  d2wContext = new D2WContext();
>>  }
>>  return d2wContext;
>> }
>> 
>> synchronized public NSArray inferFilterKeysForEntity(String 
>> entityName) {
>>  EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
>>  d2wContext().setEntity(entity);
>>  d2wContext().setTask(request().method());
>>  return (NSArray) 
>> d2wContext().inferValueForKey("displayPropertyKeys");
>> }
>> 
>> synchronized public NSArray inferFilterKeysForPage(String page) {
>>  d2wContext().setDynamicPage(page);
>>  d2wContext().setTask(request().method());
>>  return (NSArray) 
>> d2wContext().inferValueForKey("displayPropertyKeys");
>> }
>> 
>> public ERXKeyFilter showFilter(String entityName) {
>>  NSArray keys = inferFilterKeysForEntity(entityName);
>>  ERXKeyFilter filter = null;
>>  if (keys != null && !keys.isEmpty()) {
>>  filter = ERXKeyFilter.filterWithNone();
>>  for (String key : keys) {
>>  filter.include(new ERXKey(key));
>>  }
>>  } else {
>>  filter = 
>> ERXKeyFilter.filterWithAttributesAndToOneRelationships();
>>  }
>>  return filter;
>> }
>> 
>> 
>> The D2WRule should be something like:
>> 
>> LHS: entity.name = 'Employee' and task = 'GET'
>> RHS: displayPropertyKeys = ('firstName', 'lastName', 'position')
>> 
>>> 
 I've just started to use REST with our business logic. 
 
 I wanted to use ERDirectToRest because it seems very interesting to 
 quickly delivery access to the business logic but there are a lot of 
 warning to NOT use it:
 - In the read me: "This framework uses the old and deprecated REST APIs, 
 avoid using it."
 - Classes are deprecated
 
 So my questions: 
 - Can this framework be used ? 
 - Does anybody use it ? 
 - What people use instead ?
 
 Dominique
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
 
 This email sent to prob...@macti.ca
>>> 
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
>>> 
>>> This email sent to farrukh.i...@fuegodigitalmedia.com
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>> 
>> This email sent to prob...@macti.ca
> 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Who uses ERDirectToRest ?

2012-07-13 Thread Pascal Robert

Le 2012-07-13 à 17:21, Farrukh Ijaz a écrit :

>> AFAIK, nobody use it, except maybe Anjo. Using the "routes" based API in 
>> ERRest in quite easy, but I do agree that being able to use D2W rules 
>> instead of ERXKeyFilter to decide what is going to be send or accepted would 
>> be cool.
> 
> One can use following methods in the Route Controller class. I have create a 
> BaseRouteController and defined all useful methods in it.

Thanks. I added it to the wiki:

http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-UsingD2WruleswithERRest

> Farrukh
> 
> private D2WContext d2wContext;
> 
> protected D2WContext d2wContext() {
>   if (d2wContext == null) {
>   d2wContext = new D2WContext();
>   }
>   return d2wContext;
> }
> 
> synchronized public NSArray inferFilterKeysForEntity(String 
> entityName) {
>   EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
>   d2wContext().setEntity(entity);
>   d2wContext().setTask(request().method());
>   return (NSArray) 
> d2wContext().inferValueForKey("displayPropertyKeys");
> }
> 
> synchronized public NSArray inferFilterKeysForPage(String page) {
>   d2wContext().setDynamicPage(page);
>   d2wContext().setTask(request().method());
>   return (NSArray) 
> d2wContext().inferValueForKey("displayPropertyKeys");
> }
> 
> public ERXKeyFilter showFilter(String entityName) {
>   NSArray keys = inferFilterKeysForEntity(entityName);
>   ERXKeyFilter filter = null;
>   if (keys != null && !keys.isEmpty()) {
>   filter = ERXKeyFilter.filterWithNone();
>   for (String key : keys) {
>   filter.include(new ERXKey(key));
>   }
>   } else {
>   filter = 
> ERXKeyFilter.filterWithAttributesAndToOneRelationships();
>   }
>   return filter;
> }
> 
> 
> The D2WRule should be something like:
> 
> LHS: entity.name = 'Employee' and task = 'GET'
> RHS: displayPropertyKeys = ('firstName', 'lastName', 'position')
> 
>> 
>>> I've just started to use REST with our business logic. 
>>> 
>>> I wanted to use ERDirectToRest because it seems very interesting to quickly 
>>> delivery access to the business logic but there are a lot of warning to NOT 
>>> use it:
>>> - In the read me: "This framework uses the old and deprecated REST APIs, 
>>> avoid using it."
>>> - Classes are deprecated
>>> 
>>> So my questions: 
>>> - Can this framework be used ? 
>>> - Does anybody use it ? 
>>> - What people use instead ?
>>> 
>>> Dominique
>>> 
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>>> 
>>> This email sent to prob...@macti.ca
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
>> 
>> This email sent to farrukh.i...@fuegodigitalmedia.com
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> 
> This email sent to prob...@macti.ca


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Who uses ERDirectToRest ?

2012-07-13 Thread Farrukh Ijaz
> AFAIK, nobody use it, except maybe Anjo. Using the "routes" based API in 
> ERRest in quite easy, but I do agree that being able to use D2W rules instead 
> of ERXKeyFilter to decide what is going to be send or accepted would be cool.

One can use following methods in the Route Controller class. I have create a 
BaseRouteController and defined all useful methods in it.

Farrukh

private D2WContext d2wContext;

protected D2WContext d2wContext() {
if (d2wContext == null) {
d2wContext = new D2WContext();
}
return d2wContext;
}

synchronized public NSArray inferFilterKeysForEntity(String entityName) 
{
EOEntity entity = EOModelGroup.defaultGroup().entityNamed(entityName);
d2wContext().setEntity(entity);
d2wContext().setTask(request().method());
return (NSArray) 
d2wContext().inferValueForKey("displayPropertyKeys");
}

synchronized public NSArray inferFilterKeysForPage(String page) {
d2wContext().setDynamicPage(page);
d2wContext().setTask(request().method());
return (NSArray) 
d2wContext().inferValueForKey("displayPropertyKeys");
}

public ERXKeyFilter showFilter(String entityName) {
NSArray keys = inferFilterKeysForEntity(entityName);
ERXKeyFilter filter = null;
if (keys != null && !keys.isEmpty()) {
filter = ERXKeyFilter.filterWithNone();
for (String key : keys) {
filter.include(new ERXKey(key));
}
} else {
filter = 
ERXKeyFilter.filterWithAttributesAndToOneRelationships();
}
return filter;
}


The D2WRule should be something like:

LHS: entity.name = 'Employee' and task = 'GET'
RHS: displayPropertyKeys = ('firstName', 'lastName', 'position')

> 
>> I've just started to use REST with our business logic. 
>> 
>> I wanted to use ERDirectToRest because it seems very interesting to quickly 
>> delivery access to the business logic but there are a lot of warning to NOT 
>> use it:
>> - In the read me: "This framework uses the old and deprecated REST APIs, 
>> avoid using it."
>> - Classes are deprecated
>> 
>> So my questions: 
>> - Can this framework be used ? 
>> - Does anybody use it ? 
>> - What people use instead ?
>> 
>> Dominique
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>> 
>> This email sent to prob...@macti.ca
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
> 
> This email sent to farrukh.i...@fuegodigitalmedia.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Who uses ERDirectToRest ?

2012-07-13 Thread Pascal Robert
AFAIK, nobody use it, except maybe Anjo. Using the "routes" based API in ERRest 
in quite easy, but I do agree that being able to use D2W rules instead of 
ERXKeyFilter to decide what is going to be send or accepted would be cool.

> I've just started to use REST with our business logic. 
> 
> I wanted to use ERDirectToRest because it seems very interesting to quickly 
> delivery access to the business logic but there are a lot of warning to NOT 
> use it:
>  - In the read me: "This framework uses the old and deprecated REST APIs, 
> avoid using it."
>  - Classes are deprecated
> 
> So my questions: 
>  - Can this framework be used ? 
>  - Does anybody use it ? 
>  - What people use instead ?
> 
> Dominique
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> 
> This email sent to prob...@macti.ca


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Who uses ERDirectToRest ?

2012-07-13 Thread Schoenenberger Dominique
I've just started to use REST with our business logic. 

I wanted to use ERDirectToRest because it seems very interesting to quickly 
delivery access to the business logic but there are a lot of warning to NOT use 
it:
  - In the read me: "This framework uses the old and deprecated REST APIs, 
avoid using it."
  - Classes are deprecated

So my questions: 
  - Can this framework be used ? 
  - Does anybody use it ? 
  - What people use instead ?

Dominique


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com