Profile cover photo
Profile photo
Leonardo M. Ramé
91 followers -
Software Developer
Software Developer

91 followers
About
Leonardo M.'s interests
View all
Leonardo M.'s posts

Post has attachment
Using our library is pretty easy, just npm install, then grunt install, and finally bower, done!
Photo

New post after two years!, I hope you enjoy it:

http://leonardorame.blogspot.com.ar/2016/03/postgresql-tablespaces.html

Hi Silvio, how it's going? I noted you didn't updated the Github project since last year. Is everything ok?.

BTW, I'm using Brook (with AngularJS) on all the web projects I'm involved right now and I must say it's a pleasure to work with it.

Hi Silvio and others, do you know if a CGI app can serve binary files with transfer-encoding: chunked?.

I'm serving mp3 audio files and noted Google Chrome has a bug/feature that impedes seeking when I set content-lenght header, but it works ok when the server sends transfer-encoding: chunked.

Hi Silvio, I have some trouble when trying to upload a file using the Recorder.js component (https://github.com/jwagener/recorder.js).

The request payload captured from Firefox is this:

Content-Type: multipart/form-data;     boundary=qtndceshqjhkoijjbcvjjertynfcqdjr
Content-Length: 209323

--qtndceshqjhkoijjbcvjjertynfcqdjr
Content-Disposition: form-data; name="Filename"

audio.wav
--qtndceshqjhkoijjbcvjjertynfcqdjr
Content-Disposition: form-data; name="audio"; filename="audio.wav"
Content-Type: application/octet-stream

RIFF.......



My problem is the Files.count property is allways 0.

Here's my action:

procedure TActAudio.Post;
begin
  write(BrookSettings.DirectoryForUploads);
  write(IntToStr(Files.Count));
end;

What I'm doing wrong?.

Hi Silvio, I'm playing with Entities, and found they seem to only work with POST requests. Is this a bug?.

Hi People, I'm working on an app that needs to authenticate against a cookie for every request, so I've create a descendant from TBrookAction and implemented every action inherited from that class.

This works ok, now I want to start using Entities. To define an entity for a class, I have to specialize my class, but as it doesn't inherit from TBrookGAction I can't use my parent class. Also I cannot replace TBrookAction by TBrookGAction, because the latest is not a generic type.

Is there an easy way to adapt my custom action to allow Entities?.

Edit: simply stated, I need to inherit from TBrookGAction, but I get the error "Generics without specialization cannot be used as a type for a variable".

Silvio, I noticed you added an example of XMailer. Wouldn't be easier to understand if you change the properties Sender and Receivers to From an To, and also add CC and BCC ?.

A question regarding constraints. A constraint is an oop way to avoid adding "if" in a request?.  An example:

What I'm doing right now:

procedure TMyAction.Get;
begin
  if TheRequest.ContentFields.Values('username') <> 'juan' then
    raise exception.create('Only Juan can log in');

  Write('Welcome!');
end;

Using constraints:

procedure TMyConstraint.Execute;
begin
  if TheRequest.ContentFields.Values('username') <> 'juan' then
    Stop('Only Juan can log in');
end;

procedure TMyAction.Get;
begin
  Write('Welcome!');
end;

So, using constraints, the requests contains only code for the ideal  scenario, and leave the checkings to the constraint. Am I right?.

I'm developing a small web app using jquery and brook. It has a login page, then a menu that links to some pages with grids, if any link returns a 401 status code, then the user is redirected to login page

As I don't want to use a server-side templating system, I made it a one page app with content interchangeable by using a main div and $('#main-div').load('page.html'), it worked ok on Chrome and Firefox but, as I'm having problems with I.E., I'm thiking of replacing this with a routing framework like Ember or Sammy.js, does anyone have experience with one of them? any recommendation?.
Wait while more posts are being loaded