Terça-feira, 26 de Outubro de 2010
Desenvolvimento de uma aplicação web: Arquitectura I

 

Como escrevi antes neste blog, para a disciplina de TDI estamos a desenvolver uma mini rede social em LAMP. O projecto vai sendo regularmente publicado aqui: http://tdi.ua.labs.sapo.pt/g/tdi2010g5/www/.

No meu grupo de trabalho estamos a desenvolver uma arquitectura de base sobre a qual vai assentar o resto do projecto (código aqui), o que significa desenvolver um conjunto de classes que permitam, de forma intuitiva e rápida:

No meu entender, uma arquitectura deste tipo, não é mais do que uma série de wrappers que, bem estructurados, nos fazem poupar muitas linhas de código dando-lhe ao mesmo tempo certa limpeza e lógica interna.

Assim sendo, o nosso package <b>core</b> (código aqui) conta (de momento, já que é 'work in progress') com as seguintes classes:

 

Ficam uns exemplos do código que já se poupa, usando uma abordagem deste estilo.

Ao executar uma query, em vez de

$connection = mysql_connect($host, $user, $pass);

mysql_select_db($dbname);

mysql_query ($query);


fazemos

System::$db->query ($query);

 

Ao recuperar um objeto da base de dados, em vez de

$connection = mysql_connect($host, $user, $pass);

mysql_select_db($dbname);

result = mysql_query ("SELECT * FROM people WHERE personId=" . $id);

$ok = (is_resource ($result)) ? true : false;

$row = mysql_fetch_assoc ($result);

$person = new Person ();

$person->firstname = $row ["firstname"];

$person->lastname = $row ["lastname"];

//etc...


fazemos

$person = new Person ();

$person->personId = $id;

$person->load ();

 

OOP ftw!

Brevemente: descrição mais detalhada da classe Storable, e a arquitectura de portal... 




Terça-feira, 19 de Outubro de 2010
OK, we're here, now what?

Let's say that reading the Manifesto brought us all to the same room, being room a current state of mind. What should we do to correct this flaw we've discovered (or finally put words to) in our surroundings?

For starters, I think it would be best if we all took our modesty coats off before we begin. Leave them in the hanger and take a seat.

Now that we are confortable enough we can ask ourselves this question:

Where does our talent come from?

I'd say that it has something to do with a new way of learning things. Being able to seek knowledge for ourselves by curiousing around, paying attention to those really precious nuggets of good information in a plethora of trivia. And this behaviour comes naturally. Suddenly we realize we really learnt something when we thought we were procrastinating. Go figure.

Also, what makes us Solvers is that we are smart enough to realize that we are ignorant about something. In some way that makes us thirsty. We go on and implicate ourselves in the matter at hand until we say "Ok, I already have what I want, that'll be all for now, buhbye." and move on.

Of course, that doesn't get you job or a diploma. And no, that doesn't get you published either. You ONLY get the knowledge. And that, for us, is enough. 

(Actually, it isn't, we have to bare with the things that drove us to the Manifesto so we can pay the mortgage, the car, the beer.)

I'm not saying we should get paid extra for having this attitude of wanting to know when you really don't have to. I only think that if we assume our deviation maybe we would finally have a "more adequate purpose" when hired. Maybe being a Solver will be recognized. Maybe employers will start looking for people like us once the word gets into their "corporative lingo".

Because our kind really is needed in companies, institutes, universities and, of course, at Christmas, when you have to connect the laptop to the TV so that the family can see the pictures taken earlier that night.

And we are eager to please.

Someone I respect said "Make a video. Make it viral.". Of course, something like that would only mean anything if it were to be a community effort. With that in mind we also know that laying the grounds for upcoming Solvers is what DeCA (or at least NTC) is all about, right? So maybe there are a couple of teachers out there that will relate to this (being themselves Solvers) and maybe suggest their students to do something like that and release it with the DeCA's seal of approval.

Because that would be a message that people would pay attention to. And that would be a project that would really help our students when they finish their studies and try to get into the job market. And (why not?) maybe draw some atention to DeCA.

Maybe that won't go anywhere. Maybe it will only have a couple of views on YouTube. But, if it really goes viral, we get to watch it spread. We get to see it, we get to study it, and we get to measure it. And THAT you can publish, so there's something for the teacher as well.

Worst case scenario, noone will see it and that's that.

So lets leave this hypothetical room and sleep on it.

Don't forget to put on your modesty coats before you leave ;).

 

 

PS: This is all I wanted to say about the Manifesto. I was overwhelmed by all the shares, likes, tweets and retweets it got. I am really happy that so many people could relate to it. I wasn't mad, I wasn't upset. It was just that I could finally find the words to describe something that myself and a lot of friends and colleagues of mine have experienced at some point in our professional life. Thanks for all the props guys. Keep on solving. 



Sexta-feira, 15 de Outubro de 2010
The Solvers' Manifesto

We, programmers that have learned how to combine fonts, shapes and colors so you could offer your client a professional looking interface. We, designers that have learned how to edit video and mix audio so you could have an effective commercial for your company. We, audio and video technicians that have learned how to build a webpage so you could have your trailer on the internet without spending a dime.

We are here.

We are not programmers. Programmers don't have to make banners based on your nephews drawing. We are not designers. Designers don't have to know how to post-produce a film. We are not audio or video technicians. Audio and video technicians don't have to worry about validating your 30 field form using JavaScript so you can sell your movie online.

We are many.

Yet, we still don't know what we are. We are not multimedia engineers, because we are not engineers. We are not IT experts. Experts don't get paid two beers and a cheeseburger. We are not art developers, because artists get a lot more respect.

We are not jobless, yet there is no name for what we do. And because of that, our craft hasn't earned any respect. We are not the computer guy. We are not the girl that knows how to draw. We are not the smart intern.

We are multi taskers.

We are fast learners.

We are good listeners.

We are self taught.

We are good people, because we care about your problems, and we fix them.

We are solvers.

We know how to do anything. If we don't know how to do it, we know how to go about getting it done. And if that doesn't work either, we know a lot more people like us. A solver that will help us, and will teach us how to do it.

We learn from each other.

We help each other.

We teach each other.

We recognize each other.

We are a tribe.

We don't care about your corporative lingo, as you don't care about our obscure movie references. We don't care about your suits, as you don't care about our t-shirts with geeky puns. But we respect you, and you should respect us. Like you respect a doctor, a teacher, a mechanic or a plumber. You wouldn't second guess a doctor. You wouldn't tell a mechanic to "keep that part, its old but I like it that way".

Some of us are big time CEO's, some of us have us have earned some credit in small circles, usually populated by people like ourselves. But most of us are exploited, doing odd jobs for you just because we are the only ones that know how to do it.

You can't graduate on what we do. We can't teach you how to do it.

We are curious, critics of our job, thinkers. We have learned from many people and we've tried and erred until we got it. We are persistent. We work when you've left. We are experts in nothing, yet we know a great deal about almost everything.

We are Solvers. That's what we do. We solve your problems. As fast as we can.

We are Solvers. We like what we do. 

But please, show some appreciation once in a while.

 



Terça-feira, 12 de Outubro de 2010
...and they called us crazy - 1

 No ensaio que fiz para a disciplina de TDI sobre o futuro da net sugeri, a certa altura, que os preços variariam minuto a minuto, segundo os seus índices nas diferentes bolsas mundiais.

Google (who else?), sempre atento aos conteúdos publicados do sapo campus, e o seu economist-in-chief Hal Varian acabam de dar o primeiro passo nesse sentido, tal como se pode ver neste link via FayerWayer: http://www.fayerwayer.com/2010/10/google-pretende-medir-la-inflacion-con-los-datos-de-la-web/, ou neste, via Financial Times: http://www.ft.com/cms/s/2/deeb985e-d55f-11df-8e86-00144feabdc0.html

Estamos um passo mais perto do futuro, e não estamos assim tão loucos.




Segunda-feira, 11 de Outubro de 2010
Segue em directo o desenvolvimento de uma aplicação web

Seguindo o desafio proposto pelos profs. Benjamim Junior e Telmo Silva, o grupo a que pertenço na disciplina de TDI decidiu partilhar com o resto da comunidade do Sapo Campus o desenvolvimento do projecto a realizar até ao final do semestre (TP2 + TP3).

Ainda em fase embrionária, podes encontrar aqui a home do grupo e os diferentes links de interesse. Site, direcção SVN se quiseres ver o código, esquema de base de dados, especificação de classes, grupos de trabalho, etc...

Em cada milestone publicarei um pequeno post com o que foi feito.

Esperamos receber os vossos comentários ao longo deste processo.

Mãos à obra.




Solução SVN grátis para projectos académicos

Para o projecto prático de TDI do MCMM andei à procura de serviços que oferecessem servidores SVN grátis, já que teremos que ser vários a programar uma mesma aplicação.Encontrei estes:

http://beanstalkapp.com/

http://unfuddle.com/

http://www.projectlocker.com/

http://sourceforge.net/

 

Escolhi o sourceforge.net apenas por pertencer à Geeknet (SlashDot, ThinkGeek), não tive tempo de experimentar os outros serviços.
 
O registo foi fácil, a activação do servidor SVN é automática (o servidor é criado ao mesmo tempo que criamos o projecto) e o Check-out, Commit e Update funcionaram perfeitamente. Apenas pede autenticação do utilizador para fazer Commit, portanto, tenham em conta que o repositório é público.
 
Já agora, o cliente de SVN que uso habitualmente em ambiente Windows é o TortoiseSVN (http://tortoisesvn.tigris.org/) de download gratuito, e não tive nenhum problema ao fazer o check-out.
 
Habitualmente não trabalho com Mac e o único cliente SVN que conheço é o Versions (http://versionsapp.com/) mas custa 36€. Se alguém conhecer um bom cliente para Mac grátis que deixe nos comentários por favor.

 

Update via Jorge Braz

"(...) relativamente à questão que deixas no fim do teu post, existe 1 solução gráfica cross platform (windows, mac, linux) open source, e consequentemente grátis, que é o rapidsvn http://rapidsvn.tigris.org/."




Domingo, 10 de Outubro de 2010
Hello World!

 Wassup UA? Are you ready to rock!?




.mais sobre mim
.pesquisar neste blog
 
.Maio 2012
Dom
Seg
Ter
Qua
Qui
Sex
Sab

1
2
3
4
5

6
7
8
9
10
11
12

13
14
15
16
17
18
19

20
21
22
23
24
25
26

27
28
29
30
31


.posts recentes

. Topography of Terror

. Elevator Pitch: Proposta ...

. Triplestores

. First Meeting

. Review of Tom Stonier’s I...

. Monografia Aphex Twin

. Processing + JMyron + OSC

. VJing with Processing and...

. Nunchuk Norris

. jMyron e Processing

.arquivos

. Maio 2012

. Novembro 2011

. Outubro 2011

. Setembro 2011

. Maio 2011

. Abril 2011

. Março 2011

. Fevereiro 2011

. Janeiro 2011

. Dezembro 2010

. Outubro 2010

.tags

. todas as tags

.participar

. participe neste blog

blogs SAPO
.subscrever feeds