seeking an example of a Seaside database query UI

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

seeking an example of a Seaside database query UI

ccrraaiigg

Hi--

     Is there an example somewhere of a simple database query UI in
Seaside? I have a bunch of objects in a Gemstone database (in a
GLASS-enabled extent), and I'd like to demo a UI that makes rudimentary
queries on them (e.g., "show me all instances of this class with value X
for field Y").


     thanks!

-C

--
Craig Latta
www.netjam.org/resume
+31   6 2757 7177
+ 1 415  287 3547 (no SMS)

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seeking an example of a Seaside database query UI

NorbertHartl

Am 02.10.2012 um 00:03 schrieb Craig Latta <[hidden email]>:

>
> Hi--
>
>     Is there an example somewhere of a simple database query UI in
> Seaside? I have a bunch of objects in a Gemstone database (in a
> GLASS-enabled extent), and I'd like to demo a UI that makes rudimentary
> queries on them (e.g., "show me all instances of this class with value X
> for field Y").
>
There is nothing special when using a gemstone database. Just use the collection protocol you are used to. It might not be a good idea to use allInstances in gemstone because this could be a costly operation. If you collect your instances on the class side you can do

MyClass instances select: [:each| each field = 'value1' and: [ each field2 = 'value2']]

This should be sufficient for simple queries. If your collections are getting large (>10000) there are several options in gemstone to optimize.

hope that helps,

Norbert


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seeking an example of a Seaside database query UI

ccrraaiigg

Hi Norbert--

> There is nothing special when using a gemstone database...

     Sure, I understand all the behind-the-scenes stuff. What I'd like
now is a front-end web GUI. A Seaside app that I can show to
non-programmers who need databases built for their data. :)


-C

--
Craig Latta
www.netjam.org/resume
+31   6 2757 7177
+ 1 415  287 3547 (no SMS)

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seeking an example of a Seaside database query UI

fstephany
In reply to this post by ccrraaiigg
Maybe Glamour can help you? There's a Seaside version somewhere if I
remember well...


On 01/10/12 15:03, Craig Latta wrote:

>
> Hi--
>
>       Is there an example somewhere of a simple database query UI in
> Seaside? I have a bunch of objects in a Gemstone database (in a
> GLASS-enabled extent), and I'd like to demo a UI that makes rudimentary
> queries on them (e.g., "show me all instances of this class with value X
> for field Y").
>
>
>       thanks!
>
> -C
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seeking an example of a Seaside database query UI

DiegoLont
Hi Craig,

In Deltawerken we have the possibility to search our objects. In storyboard there is a simple example on the SBProjectTeamPage, where we render the search panel to find another user to invite.
We have three search components that can help us here:
        > DEFastSearchComponent: this component searches for a string in all fields.
        > DEDetailedSearchComponent allows the user to enter a value for each field.
        > DEIndirectSearchComponent allows the user to search in sub objects. I.E. to search for a user that has a project that ...

These search components should be placed on a search panel, that combines the search components (you might want to combine a detailed and a indirect search or use this to layout the search fields).

The results are either returned (when you call the search panel) or you should use the resultsBlock, that has 1 parameter: the results. The results are always an array of all objects that satisfy the search criteria.

By default most searches are a "substring" search that can be overridden per field (i.e. the number field only responds to an exact match by default)

Deltawerken is designed to work on a Pharo and Gemstone, so it should work on Gemstone without a problem. Your objects need to describe their fields in order to be used by deltawerken.

I hope this helps to get you started,

Stephan and Diego

On Oct 2, 2012, at 1:59 AM, Francois Stephany wrote:

> Maybe Glamour can help you? There's a Seaside version somewhere if I remember well...
>
>
> On 01/10/12 15:03, Craig Latta wrote:
>>
>> Hi--
>>
>>      Is there an example somewhere of a simple database query UI in
>> Seaside? I have a bunch of objects in a Gemstone database (in a
>> GLASS-enabled extent), and I'd like to demo a UI that makes rudimentary
>> queries on them (e.g., "show me all instances of this class with value X
>> for field Y").
>>
>>
>>      thanks!
>>
>> -C
>>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seeking an example of a Seaside database query UI

ccrraaiigg

> [Deltawerken]

     Thanks guys, I'll check it out!

-C

--
Craig Latta
www.netjam.org/resume
+31   6 2757 7177
+ 1 415  287 3547 (no SMS)

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside