6 maneiras de fazer a mesma coisa, o que é considerado boas práticas?

As vezes tem tantas maneiras diferentes de fazer o mesmo código que nós ficamos na dúvida quanto a qual maneira usar. O que seria considerado "boa prática" pela comunidade e o que sua equipe entenderia melhor. Suponhamos que você esteja trabalhando dentro de um método de um Domain Service chamado UmDomainServiceChique(objetoDoDominio) que será chamado por uma API. Você tem uma regra de negócio chique para ser verificada que por enquanto chamarei de VerificaMinhaRegraChiqueComplexa(). Você chama UmDomainServiceChique(objetoDoDominio) e caso VerificaMinhaRegraChiqueComplexa() retorne true você vai querer que UmDomainServiceChique faça o que tem que fazer e a api retornar Ok 200, caso contrário você quer que a API responda um erro qualquer, tipo BadRequest, e retornar uma mensagem dizendo que VerificaMinhaRegraChiqueComplexa deu ruim. Eu vejo 6 maneiras de fazer isso, gostaria de saber a opinião de outrs devs sobre qual seria a maneira menos gambiarr

Migração do Live Spaces para o Wordpress

Uma boa notícia (ou não) para quem tem um blog no Live Spaces mas acha uma droga. A Microsoft, em parceria com o Wordpress resolveu migrar os blogs feitos no Live para a plataforma Wordpress.

Eu acho isso uma boa idéia pois assim a microsoft pode focar no que ela tem de melhor e realmente sabe fazer, e deixar a parte que ela não tem muito know how para terceiros.

Pelo calendário da microsoft você tem até 4 de janeiro de 2011 para baixar o conteúdo e migrar, até essa data você ainda pode postar conteúdo. Passando de 4 de janeiro o blog será travado para novas pstagens, permitindo-se apenas consultas e o download do conteúdo. No dia 16 de março de 2011 o live spaces será fechado de vez.

Veja abaixo a mensagem original que enviaram para os usuários:



Dear Windows Live Spaces customer,
We are very excited to announce our collaboration with a premier and innovative blogging service, WordPress.com, to offer you an upgraded blogging experience. We'll help you migrate your current Windows Live Spaces blog to WordPress.com or you can download it to save for later. On March 16th, 2011 your current space will close.
With the new release of Windows Live services, we've made a series of changes and improvements across our products. We chose to partner to provide our users with a fantastic blogging solution. However, we realize the changes will have an impact on you - this email aims to address any concerns you may have.

Why is this happening?
Our customers have asked for richer blog functionality including an integrated statistics system, continuous saving of drafts and improvements to spam-fighting technology. To deliver the best possible blogging experience, we are collaborating with WordPress.com to provide their free service to you. For those of you that already have a blog on Windows Live Spaces, we will make it easier for you to get started while helping you move what you've already built up on Spaces.


What is the timeline?
Starting the end of September, 2010, when you visit your Windows Live Space you'll be given the opportunity to upgrade your blog by migrating it to WordPress.com and to download your content to save for later. 

As of January 4th, 2011, you won't be able to make changes to your Spaces blog, but you can continue to review past posts, download your content to save for later and upgrade your blog to WordPress.com. 

On March 16th, 2011 Windows Live Spaces will close and you will not be able to access or migrate your blog on Spaces.


What you need to do before Windows Live Spaces closes
Starting the end of September, when you visit your space you'll have the following options:
  • Upgrade your blog by migrating to WordPress.com - We will provide a simple way to move your blog posts and comments to WordPress.com.
  • Download your blog – You can download your old posts to keep a copy with you. You can also do this and then migrate to WordPress.com.
  • Delete your space - If you decide that you do not want to have a space anymore, you have the option to delete it permanently. If you want to save your content, please make sure to do that before deleting your space.
  • If you can't decide, take some time – Over the next few months, Windows Live Spaces will continue to be accessible while you make your decision. But we're very excited about what you can do on WordPress.com and hope you'll decide to take advantage of this improved blogging experience.
Note: some content such as gadgets, guestbook, lists, notes and draft posts won't be migrated. See FAQs for more info on how to preserve this type of content. 

Go to your space to choose an option that's right for you.


What you can expect by moving to WordPress.com
All of your posts, comments, and links will transfer, and you will have the option to share your blogging updates with your Messenger friends.

On WordPress.com, you'll get tools to help you track how your blog is doing and who's visiting. You'll get tagging that enables people to find you, and for you to find like-minded people. It includes great blog comment functionality, and trackback spam prevention to help keep your experience clean. Check out more.
Thanks for using Windows Live and we hope you enjoy the new blogging experience.
Sincerely,
The Windows Live team
Frequently Asked Questions
Q: What is WordPress.com ?
A: WordPress.com is a free blogging site, similar to Windows Live Spaces. On WordPress.com, you'll find great themes and widgets to customize your experience, tools to help you track how your blog is doing and who's visiting. You'll get tagging that enables people to find you, and for you to find like-minded people. It includes great blog comment functionality, and trackback spam prevention to help keep your experience clean.


Q: What happens to my Windows Live Spaces content and what can I migrate?
A: Here's a list of different functionality available on Windows Live Spaces today and what you can expect:

  • Blogs and comments: If you choose to migrate or download, your blog content (including inserted photos, videos and comments) comes with you.
  • Photos: Photos not part of your blog but part of Windows Live will continue to live on SkyDrive and, if you choose, you can continue to share them with others. Photos that were part of your blog will be migrated if you choose to migrate your blog. If you add any other modules provided by other services that shared your photos, those will not be migrated.
  • Visitors will know where to find you: If you migrate, existing links to your blog and specific articles will continue to work and your visitors will be redirected to your new location on WordPress.com. You'll also be able to keep your friends up to date with your latest posts on Windows Live Messenger.          
  • Private blogs: If you have a private blog, your blog will be checked as private unless you choose another option during migration. You'll be able to share your blog back with your Windows Live Messenger friends or just choose to select a few people to invite to WordPress.com.
  • Gadgets, guestbook, lists, notes, and draft posts: Unfortunately, you won't be able to move these. You might consider publishing your draft posts over the coming months and moving content in lists and notes into your blog before migrating.
  • Profile and Contacts modules: That information stays on Windows Live. You can add your new blog to your Profile and share it with your friends.


Q: What can I expect between now and the date Windows Live Spaces closes?
A: Starting at the end of September 2010, when you visit your space you'll be given the opportunity to upgrade your blog by migrating it to WordPress.com and to download your content to save for later. Your space will continue to be available for you to publish to. As of January 4th, 2011, you will lose the ability to make changes to your Windows Live Spaces blog, but you can continue to review past posts, download your content to save for later and upgrade your blog to WordPress.com. On March 16th, 2011, Windows Live Spaces will close and you will not be able to access or migrate your blog.


Q: Where can I learn more?
A: Are you a parent of a child who uses Windows Live Spaces? Do you have a private blog? Do you use Writer to publish to Windows Live Spaces? Do you have other questions? Please visit our Help Center for additional information and resources.


Eu mostrarei a seguir como fazer a migração:

1) Clique no link logo na primeira página:
Clique em "Começar"
 2) Você será avisado de que as listas, gadgets, recados e rascunhos não serão portados e isso é irreverível. "E eu tenho escolha?" Vamo que vamo.

        
3) Quando solicitar que você se logue, use seu login do live spaces.

4) Escolha domínio, título, linguagem e fuso horário.

5) Clique em "Criar Blog" e seja o que Deus quiser.


Depois de passada a barra de progresso você terá um novo blog (ou não) http://vitorrubio.wordpress.com/

Acho que vou aproveitar o blog novo, já que o wordpress é infinitamente melhor que o live spaces, e vou postar nele todos os assuntos referentes a reflexões, protestos, reclamações etc. Assim eu deixo este blog dedicado apenas à programação.

Have fun (ou não) :p

Comentários

Postagens mais visitadas deste blog

Busca de CEP com o Lazarus - Parte 1 - UrlEncode

Botão Add This para adicionar seu post em qualquer rede

Uso de memória no SQL Server