segunda-feira, agosto 18, 2008

Engenharia de Redes de Comunicações

1º Ano:

Matemática I - 10
Álgebra Linear e Geometria Analítica - 11
Sistemas Digitais - 10
Programação I - 13
Sistemas Eléctricos e Electrónicos I - 12
Seminário - 14
Matemática II - 10
Probabilidade e Estatística - 10
Física Aplicada às Comunicações - 11
Programação II - 12
Inglês - 11
Sistemas Eléctricos e Electrónicos II - 11


2º Ano:

Redes Locais I - 10
Arquitectura de Computadores - 12
Bases de Dados I - 15
Sinais e Sistemas - 15
Programação Avançada - 13
Redes Locais II - 12
Sistemas de Telecomunicações - 12
Comunicações Digitais - 12
Sistemas Operativos II - 14
Bases de Dados II - 12


3º Ano:

Interligação de Redes I - 10
Sistemas Distribuídos e Paralelos - 17
Comunicações Móveis - 13
Tecnologias de Redes sem Fios - 12
Aplicações para Redes Globais - 15
Interligação de Redes II - 11
Sistemas Operativos II - 13
Sociedade, Profissão e Ética - 14
Projecto (Aplicação PHP) - 16
Gestão e Inovação - 10


Extra-Curriculares:

Comunicações Seguras - 16
Administração de Sistemas e Serviços - 18
Engenharia de Redes - 15
Aplicações Distribuídas - 15
Seminários - 17



Média Final: 14


Principais aptidões ganhas durante os 4 anos de Universidade:
  • Programação Web: HTML, Javascript, PHP, ASP.NET, C#
  • Bases de Dados: MS Access, Oracle, PL/SQL, MySQL, SQL SERVER
  • Programação Orientada a Objectos: Java, C#
  • Administração de Sistemas: Programação Bash, Perl, C-Linux, Windows 2003 Server
  • Programação de baixo-nível: C/C++

À procura de novas sonoridades: Sigur Rós

Sigur Rós é uma banda islandesa de post-rock, com elementos melódicos, clássicos e minimalistas. O nome, em islandês, significa "rosa da vitória", e pronuncia-se "si ur rous", ou ['sɪɣʏr rous] no Alfabeto Fonético Internacional. A banda é conhecida pelo seu som etéreo e pelo falsete do vocalista, Jónsi. Alguns de seus contempôrâneos são Múm e Amiina, ambas surgidas da mesma cena criativa e vibrante do post rock da Islândia.


Discografia

Álbums

* Von (Esperança) (1997)
* Von Brigði (Alteração da Esperança) (1998) - Remixes do primeiro álbum.
* Ágætis Byrjun (Um Bom Começo) (1999) - #52 no Reino Unido - Considerado o melhor álbum islandês do século XX.
* ( ) (2002) - #51 EUA, duas indicações ao Grammy, uma para "Melhor Álbum de Música Alternativa", a outra para "Melhor Embalagem de CD".
* Takk... (Obrigado...) (2005) - #16 Reino Unido, #27 EUA, #1 Islândia, #5 Portugal, #18 Austrália
* Með Suð í Eyrum Við Spilum Endalaust (Tocamos Para Sempre Com Um Zumbido Nos Ouvidos) (2008)

Singles e EPs

* Svefn-g-englar (1999)
* Ný batterí (2000)
* Steindór Andersen / Rímur EP (2001)
* Untitled #1(ou Vaka) (2003)
* Ba Ba Ti Ki Di Do (2004)
* Hoppípolla (2005) - #24 Reino Unido
* Sæglópur (2006)

Coletâneas

* Smekkleysa Í Hálfa Öld (1994) - Coletânea com músicas do selo Smekkleysa, com a primeira música do Sigur Rós lançada comercialmente.
* Popp Í Reykjavík (1998) - Coletânea com as músicas do filme homônimo sobre a cena musical de Reykjavík no final da década de 1990.

Bandas sonoras

* Englar Alheimsins (2000) - Trilha sonora para o filme islandês Englar Alheimsins.
* Hlemmur (2002) - Trilha sonora para o documentário islandês Hlemmur [1].
* ( ) (2001)- Trilha sonora para o filme Vanilla Sky, com Tom Cruise, Cameron Diaz e Penélope Cruz.
* (2008)- Trilha sonora para o filme Penellope, com Christina Ricci, Catherine O'Hara.



Fonte: Wikipédia

Jogos Olímpicos 2008 :: Medalha de Prata para Vanessa Fernandes no Triatlo




Vanessa Fernandes terminou em 2.º lugar na prova de triatlo, oferecendo assim a primeira medalha à missão portuguesa nestes Jogos Olímpicos de Pequim’2008.

Numa prova em que teve uma prestação atípica, com visíveis dificuldades em determinados momentos da contenda, Vanessa teve na australiana Emma Snowsill uma adversária de respeito, que cedo deu a entender que queria resolver a questão do ouro com autoridade. E conseguiu...

Snowsill cumpriu a prova em 1:58.27 horas, com Vanessa passar a meta e a conquistar a prata 1.06 minutos depois. No terceiro lugar terminou outra australiana, Emma Moffatt, a 1.28 minutos.

Depois de ter concluído o primeiro sector - o triatlo é composto por natação (1.500 metros), ciclismo (40 km) e atletismo (10 km) - a apenas 3 segundos da norte-americana Laura Bennett, que fez 19:49.82 minutos, a portuguesa integrou o principal grupo no segundo sector, numa prova tranquila.

Após ter saído da água no 9.º lugar, Vanessa portou-se à altura na prova de ciclismo, tendo sido a primeira a descer da bicicleta na transição. Contudo, demorou alguns preciosos segundos e acabou por sair em 11.ª, a 9 segundos da neo-zelandesa Hewitt.

Foi nesta fase que Snowsill meteu o “turbo” e fugiu para uma conquista tranquila, apesar dos esforços de Vanessa, a grande perseguidora da australiana.




Quanto a mim, resta-me dar os Parabéns a esta gigante atleta, uma pessoa incrivelmente simples e humilde, és enorme Vanessa. Enorme.

ASP.NET: DataSet vs DataReader (Pt. 03/03)

DataTables vs. DataSets
A number of commenters brought up mentions of DataTables, correctly pointing out that DataTables offer better efficiency than DataSets, but with more features than the DataReader. For example, one comment read:

I mostly use DataTables (sometimes DataReader) since pages usually deal with a single table of data. It is quite upsetting to find books and tutorials forever teaching the use of DataSet together with DataAdapter. I wonder how many know the DataAdapter works with DataTables stand alone.
-- icelava
Yes, it is true that the DataTable is more efficient than the DataSet. The DataSet is, after all, a set of DataTables; you can programmatically access the DataSet's collection of DataTables through its Tables property. And DataTables offer the functionality not found in DataReaders: DataTables support random access, can be sorted and filtered using DataViews, their contents can modified through insertions, updates, and deletes.

So should you use DataTables in lieu of DataSets? Sure, if you can. A DataTable doesn't support all of the features of a DataSet, so they might not be an appropriate choice. (For example, in .NET 1.x DataTables cannot be natively serialized into XML; additionally, if you need to represent relationships among multiple DataTables, you'll need to use a DataSet.) What it all comes back - and this was my thesis from the original Why I Don't Use DataSets article - is that you should use the right object for the job at hand. Each data object has a time and place - my contention is that DataSets (and DataTables) have limited use in ASP.NET applications.

Returning DataSets from Web Services
In my original article I mentioned that one use of DataSets is a conduit for returning database data from an XML Web Service. Since DataSets can trivially be serialized into XML, developers are quick to use DataSets when returning database information from a Web service. In fact, a number of commenters mentioned this:

If you're using webservices in your application that return result sets, then you would want to use a dataset to hold these result sets.
-- Wessam Zeidan
While DataSets are an easy way to return data, I think they are less than ideal for a couple of reasons. First, they add a lot of bloat to the returned XML payload since DataSets return not only the data they contain but also the data's schema. If you are only returning a small number of records, the payload's size can be dominated by the schema information. Second, DataSets have the air of being platform specific. While it's true that an XML serialized DataSet is, after all, just XML and therefore can be processed by a client on any platform, it still has a platform-specific feel to it since the resulting XML markup is dictated by Microsoft. A .NET client can automatically deserialize a DataSet's XML payload returned from a Web service back into a DataSet, thereby making DataSets an easy and attractive option. Clients using other platforms, however, will find they have to invest a lot more effort in order to work with the server's returned serialized DataSet.

The solution? Create a serializable, custom business object and have your Web services return an array of these custom objects. The overall payload size will be significantly less and the returned payload will be more inviting to clients not using .NET. One commenter summed up this sentiment nicely with:

For me, DataSets are too platform specific to use in Web Services. I prefer returning XML serialized arrays of objects. It may require my consumer to do a little bit more work, but it ensures that I have a wider base of consumers.
-- Scott
The one downside of returning custom collections from a Web service is that for .NET clients, these custom classes are serialized as classes with public fields as opposed to public properties. When binding a custom collection to a DataGrid or other data Web control, the data binding only allows binding to properties. Fortunately this nuisance is fixed in .NET 2.0. (For more information on the benefits of returning custom collections from Web services as well as how to work around the field/properties pain, be sure to check out the "Binding to Web Services" section of Dino Esposito's Collections and Data Binding article.)

Yes, Using DataReaders You Can Do That, Too!
There were a number of comments from readers who seemed to be using the DataSet because they (incorrectly) believed that the same functionality could not be accomplished through the use of DataReaders. One reader asked: "How would you handle sorting, paging and updating if you fill a DataReader into a DataGrid?" Assuming this commenter was asking about ASP.NET DataGrids, the answers can be found throughout the An Extensive Examination of the DataGrid Web Control article series here on 4Guys. See Part 4 for information on sorting, Part 15 for the low-down on paging, and Part 6 for the scoop on editing.

Additionally, in reading many of the comments in favor of DataSets it appeared that a number of commenters seemed to think that the DataSet was an ideal object for computing aggregates - counts, sums, and so on - or for retrieving two related tables and displaying fields from both. While the DataSet can accomplish these tasks, I'd recommend performing these operations at the database if possible. SQL has a rich set of aggregate functions - COUNT, SUM, MAX, and MIN, to name a few - and a join at the database level is always going to be more efficient than bringing back all of the data from both tables and relating the resulting rows at the ADO.NET layer. (Granted, there is a time and a place for this, such as when working with disconnected data in a desktop application, but I would contend that these features are not often needed in Web applications.)

How Important is Performance?
In my original article one of my main thrusts for not using DataSets was the performance disparity between DataSets and DataReaders. As I cited from A Speed Freak's Guide to Retrieving Data in ADO.NET, when bringing in several hundred or thousands of records, a DataSet can take several seconds to be populated, where as a DataReader still boasts sub-second response times. Of course, these comparisons against several hundred to several thousand records are moot if you are working with a much smaller set of data, say just 10 to 50 records in total. For these smaller sized result sets, the DataSet will only cost you less than a second (although the DataReader still is, percentage-wise, much more efficient).

This gives rise to the question, then, of "How often are you bringing back hundreds of records from the database?" And, more importantly, "Should you be bringing back hundreds (or thousands) of records?" One commenter noted that:

The [Speed Feak] article shows how performance degrades all the way up to 10,000 records... realistically you should never be displaying a client more than 100-200 over the web if not for performance purposes but just readability.
-- Eric Wise
I agree wholeheartedly, but what one "should do" vs. what one is "asked to do" can be two different things. I've had clients in the past who, despite my suggestions, were adamant about having large amounts of data shown on the page, be it a gargantuan DataGrid or a drop-down list with hundreds (or even thousands - eep!) of records. Additionally, many developers, when adding paging support to a DataGrid, either always use the default paging model or implement the default paging model at first with plans to later upgrade it to the custom paging model. Default paging, as you may know, is far less efficient than custom paging because it requires that the entire data to be paged through be brought back for each and every page, even though only a small subset of the data is actually shown. Custom paging is more intelligent - yet more difficult to implement - because it only retrieves the precise subset of data to display for the current page. (For more on default paging see An Extensive Examination of the DataGrid Web Control: Part 15; for information on custom paging, refer to my book, ASP.NET Data Web Controls Kick Start.)

Even if you are able to convince your client to show only a reasonable amount of data per page, and even if you have the foresight and expertise to use custom paging on all of your pageable DataGrids, the performance gain from using DataReaders as opposed to DataSets would make your application snappier and more adept to scale.

What It All Boils Down To: Design/Develop-Time Efficiency vs. Run-Time Efficiency
What the DataReader vs. DataSets argument really comes down to is design- and develop-time efficiency vs. run-time efficiency. As I mentioned in the original Why I Don't Use DataSets article, the DataReader boasts much greater run-time efficiency over the DataSet. But, as numerous readers noted, the DataSet comes with a number of features that are lacking in with the DataReader, thereby reducing the time it takes to code the application.

For read-only display data, Scott may have point. But for Web sites that collect information from the user and pass it back to the database, DataSets (or DataTables) are much more efficient because the data adapters have the update methods already constructed (auto generated code).
-- Dave C

I've ventured down both paths and came to the conclusion to use the DataSet over custom objects for complex data requests. It may be a heav[i]er object, but it's very powerful and very flex[i]ble. If you['re] pulling back a large set of relational or semi-relational data it's extraordinarily convenient and easy to implement. The features and services are just to[o] compelling to ignore.
-- Lynn

The #1 key benefit [of using DataSets] for me, though, is maintainability of the resultant code base and the rapidity that I can modify/add new functionality. Not to mention the fact that most any .NET developer walking-in off the street is going to be familiar with DataSets/DataAdapters....
-- Mike
If you are already familiar with the DataSet and/or working on a team that is familiar with that model, and if optimal run-time performance is not a concern, then you may find the DataSet to be a better tool for the job. Of course, not everyone enjoys the added features of the DataSet. Some, like this commenter, prefer the simplicity and higher degree of control that custom business objects affords:
I totally agree with Scott on this one. The DataSet, although a very novel disconnected design, brings with it a rather complex model to support. The more they work into your architecture, the more cumbersome things can become. That statement comes from using them for things like reading XML into the DataSet and having to do a bunch of customized sorting. The syntax is right down bewildering...

My personal approach is using business objects. There are a lot of reasons they end up being highly valuable. One of those reasons is the ability to port designs into other OO languages like Java. ... I was a huge advocate and had the whole DataSet stuff forced down my throat from a "top 3" consulting firm. I did use them and they are still in my architectures. But, from now on I think I am sticking to good old business objects.

-- David

Conclusion
This article served as a follow-up to my earlier article, Why I Don't Use DataSets in My ASP.NET Applications, addressing a number of comments made by readers in the associated blog entry. Thanks to all those who took the time to comment on my blog! If you'd like to continue this discussion, you can do so at http://scottonwriting.net/sowblog/posts/3867.aspx.


Article written by Scott Mitchell (avaliable Here)

ASP.NET: DataSet vs DataReader (Pt. 02/03)

Introduction
A couple weeks ago (April 19th) I gave a talk to the local San Diego ASP.NET SIG and during my talk I mentioned how I, personally, rarely, if ever, use DataSets in my ASP.NET applications, sticking with the good ol' DataReader instead. Since then I have received a number of emails from attendees asking me why I don't use DataSets. Rather than responding to each questioner individually, I decided to write this article explaining my rationale. Read on to learn why I am a DataReader man all the way.

The Fundamentals of the DataReader
Before I can explain why I choose to use DataReaders over DataSets in my Web applications, it's imperative that we all have an understanding of the fundamentals of both DataSets and DataReaders. These two objects have different roles: DataSets are designed to be a mini-in-memory database whereas a DataReader is designed to be a ferry of data between the database layer and a .NET application.

In ADO.NET a provider is some source of data, and there exist provider-specific classes for working with particular providers. There's the SqlConnection, SqlCommand, SqlDataAdapter, and SqlDataReader classes for working with the SqlClient provider; there's the OleDbConnection, OleDbCommand, OleDbDataAdapter, and OleDbDataReader classes for working with the OleDb provider. Objects that are prefixed by a provider name (Sql, OleDb, Oracle, Odbc, etc.) are provider-specific objects. They are designed to work with the particular provider. A DataReader is one such object (i.e., SqlDataReader, OleDbDataReader, etc.).

To work with data via a DataReader you must first establish a connection to the data store and specify the query to execute. Next, the DataReader is created and acts as a bridge between the .NET application and the data store. For example, you might use code like the following:

' Establish Connection
Dim myConnection as New SqlConnection(connection string)
myConnection.Open()

' Create command
Dim myCommand as New SqlCommand(myConnection, SQL query)

' Create a DataReader e
Dim myReader as SqlDataReader
myReader = myCommand.ExecuteReader()

'Iterate through the results
While myReader.Read()
'... Work with the current record ...
End While

' Close the connection
myConnection.Close()

The DataReader loads one record from the data store at a time. Each time the DataReader's Read() method is called, the DataReader discards the current record, goes back to the database, and fetches the next record in the resultset. The Read() method returns True if a row was loaded from the database, and False if there are no more rows.

DataReaders are connected data objects because they require an active connection to the database. Remember, the DataReader is just a ferry of data between the application and database. Understandably, it cannot ferry information back from the database after the connection has been severed. Furthermore, a DataReader is limited to being read-only and forward-only. That is, the information retrieved from the database cannot be modified by the DataReader, nor can the DataReader retrieve records in a random order. Instead, a DataReader is limited to accessing the records in sequential order, from the first one to the last one, one record at a time.

The Fundamentals of the DataSet
DataSets are a more complex and feature-rich object than DataReaders. Whereas DataReaders simply scuttle data back from a data store, DataSets can be thought of as in-memory databases. Just like a database is comprised of a set of tables, a DataSet is made up of a collection of DataTable objects. Whereas a database can have relationships among its tables, along with various data integrity constraints on the fields of the tables, so too can a DataSet have relationships among its DataTables and constraints on its DataTables' fields.

Unlike the DataReader, a DataSet is a provider-neutral data object. There's no SqlDataSet or OleDbDataSet - just a plain, ol' DataSet. It's the responsibility of the provider's DataAdpater object to translate a particular provider's data into the provider-neutral DataSet. The following code snippet illustrates how to populate a DataSet with data from a SQL query.

' Establish Connection
Dim myConnection as New SqlConnection(connection string)
myConnection.Open()

' Create command
Dim myCommand as New SqlCommand(SQL query, myConnection)

' Create the DataAdapter
Dim myDataAdapter as New SqlDataAdapter(myCommand)

' Create the DataSet
Dim myDataSet as New DataSet

' Fill the DataSet
myDataAdapter.Fill(myDataSet)

' Close the connection
myConnection.Close()

'... Work with the contents of the DataSet ...

As the code snippet shows, the DataAdapter's Fill() method populates the DataSet with the results of the specified query. Behind the scenes, the DataAdapter is using a DataReader to read in the results of the query and fill the DataSet. The DataSet is a disconnected data object. Once the DataSet has been filled, the connection can be closed and the DataSet's contents can still be examined and manipulated.

Since a DataSet represents a separate, disconnected collection of data, it's no surprise that the DataSet's data is both editable and can be accessed randomly, two traits not exhibited by the DataReader. Additionally, the DataSet has some powerful XML-related capabilities. For example, you can serialize a DataSet into XML through its WriteXml() method; conversely, you can populate a DataSet from a properly formatted XML stream using the DataSet's ReadXml() method.

The Tradeoff Between the DataSet and DataReader
Regardless of whether or not you bring back database data using a DataSet or DataReader, you can display the underlying data in a DataGrid, DataList, or Repeater using the exact same code. Namely, you set the data Web control's DataSource property to the DataReader or DataSet and then call the Web control's DataBind() method. ASP.NET makes working with data so easy that ASP.NET developers might not give pause and think about what is the best data object to use. All things being equal, it doesn't really matter which data object you use.

But not all things are equal. Clearly there is a major difference in features supported between the DataReader and DataSet, so it's only logical that there be an inverse in the tradeoff between the two objects' performance. Simply put, the DataSet's increased feature set makes it a less performant choice for reading data than the DataReader.

According to A Speed Freak's Guide to Retrieving Data in ADO.NET, the DataReader is roughly thirty times more performant than the DataSet. For large amounts of data being brought back - several hundred or several thousand records - the absolute time differences between accessing data with these two objects can be quite pronounced. The graph below, for example, plots the results from A Speed Freak's Guide to Retrieving Data in ADO.NET for 100 to 1,000 retrieved records using a DataSet (the pink line) and a DataReader (the dark blue line). As the data shows, for retrieving 1,000 records the DataSet is more than 30 times slower than the DataReader (8.89 seconds vs. 0.29 seconds). Eep.


Be sure to read A Speed Freak's Guide to Retrieving Data in ADO.NET for the actual numbers for test runs between 1 to 100 records, 100 to 1,000 records, and 1,000 to 10,000 records, along with the test conditions used. In addition to examining the differences between the DataSet and DataReader, the article compares the performance of the SqlClient provider vs. the OleDb provider when accessing data from a SQL Server 2000 database.

Additional statistics can be found at Performance Comparison: Data Access Techniques, which compares the DataSet and DataReader against a number of common data access scenarios. The end result is that the DataReader is more performant than the DataSet, although this particular article's results do not show as large a performance difference between these two data objects as the Speed Freak article does. Also, the article notes:

In all of the preceding tests, we saw that DataReader outperformed DataSet. As mentioned earlier, the DataReader offers better performance because it avoids the performance and memory overhead associated with the creation of the DataSet. ... The DataReader is a better choice for applications that require optimized read-only and forward-only data access. The sooner you load the data off the DataReader, close the DataReader, and close the database connection, the better performance you get.

When is a DataSet Useful?
Despite the DataSet's performance limitations, there is a time and a place for the DataSet, otherwise it wouldn't be a core component in the .NET Framework. However, it is my contention that rarely, if ever, is the time and place for a DataSet in a Web application. In my experience, DataSets are useful in one of the two following situations:

  1. In a desktop, WinForms application. Consider a desktop-based data entry-type program. A user might fire up the program, load up the sales data from some database server, make some changes, and then want to save those changes. This is an ideal situation for the DataSet. It allows the data to be read into a DataSet residing in the client's memory, which affords the user the ability to work on the data without needing to constantly make trips back to the database. Upon completing editing the data, they can do a batch update, gracefully handling any changes that may have occurred while the user was working with the data in a disconnected state. Furthermore, since the DataSet is a disconnected data store, this data can be taken offline. A salesman traveling to a client's site could load this data and be able to review the data on his laptop while in transit, or while at the client's office.

    (A situation like this might arise in a Web application. I've worked on projects before where the client was adamant that they be able to interact with the Web application as discussed above. That is, they'd be able to visit a page, make a series of changes, and then click a single "Update" button. The underlying database data wouldn't be updated until that "Update" button was clicked. For this particular problem I used a Session-based DataSet, using the same techniques for a DataSet used in a desktop application for batch editing and updating.)

  2. For sending/receiving remote database information or for allowing communication between disparate platforms. Since a DataSet can be serialized/deserialized into XML so easily, they are a prime candidate for sending information across physical boundaries or as a means of serializing data into a platform-neutral format. For example, if you want to return database data from a Web service, one option is to simply read the database data into a DataSet and then return the DataSet from the Web service method. The DataSet will automatically be serialized into XML and sent over the wire. (Personally I don't recommend returning data from a Web service in this manner. Rather, I prefer to use custom business objects - it allows a finer degree of control over the XML serialization, provides a much lighter return payload, and appears less architecture-specific.)
Now, how often are you doing either of these things in your day-to-day ASP.NET development? Hardly ever, I'd wager, which is why you probably shouldn't be using DataSets! While the ASP.NET data Web controls are rather indifferent on what data object you use, you are suffering from a performance loss by choosing to use a DataSet.

Reasons Why You May Be Using a DataSet... and Reasons Why You Probably Shouldn't
In this article I have made a pretty blanket statement in saying, "Use DataReaders in Web applications and don't use DataSets." There are some scenarios in Web applications where it may seem like a DataSet is the only option. For example, imagine that you want to cache some database information that will be used on many pages across the site. This data may be user-specific and stored in the Session, or it may be the same across all users and therefore stored in the data cache. Regardless, a DataReader can't be cached because it is a connected data object, and connections to a database should be short-lived. That is, the absolutely last thing we want is an open connection sitting around in the cache. Therefore, if you want to have cached database data it may seem that the only option is to use a DataSet.

But it isn't the only option. You could, instead, create a class that has as its properties the database fields that you are storing in the DataSet. Then, when you wanted to cache the data, you could use a DataReader to read the query from the database and iterate through the records returned. For each record you'd create an instance of the custom class, set its properties to the field values of the query, and add the custom class to an ArrayList (or, preferably, a strongly-typed collection object). You'd then cache this collection of custom objects. Not only does this method prove more efficient, but, personally, I think it's more maintainable, as it removes the tight coupling between the database field names and accessing their values from the cached object (as with the DataSet). Furthermore, you can bind this custom collection to an ASP.NET data Web control exactly like you would a DataSet or DataReader. (See Displaying Custom Classes in a DataGrid for more information on this technique.)

Another reason you might use a DataSet is because you want to have random access to some data in order to search through the records, because these records may be used repeatedly. For example, when displaying a master/detail DataGrid where one column of a DataGrid contains the parent record and the other column contains another DataGrid with that particular row's children, it might make sense to use a DataSet to grab all of the children records from the database rather than having to requery the database for each DataGrid row's related set of children. (See An Extensive Examination of the DataGrid Web Control: Part 14 for more information on this technique. Essentially, it involves creating a DataGrid that looks similar to the one shown to the right.) The performance tradeoff here depends on how many rows are in the parent table. Since a DataSet is, roughly, 30 times slower than a DataReader, if there are more than 30 records in the parent table being displayed it probably makes sense to use a single DataSet rather than requerying for each parent record. (Ideally, a collection of custom objects would be used, as discussed earlier.)

Conclusion
In this article we examined the fundamentals of the two data access objects provided by ADO.NET: the DataReader and the DataSet. Both objects have their time and place in .NET applications but, in my opinion, DataSets are rarely, if ever, useful in ASP.NET Web applications. There are exceptions, granted, but for the majority of Web applications, DataReaders should be used exclusively.


Article written by Scott Mitchell (avaliable Here)

ASP.NET: DataSet vs DataReader (Pt. 01/03)

Tenho estado a trabalhar em ASP.NET e uma das grandes questões que surgiram tem a haver com a exportação dos dados da Base de Dados (SQL Server) para a aplicação C#/VB.NET.

Numa primeira tentativa, experimentei o DataSet como arquitectura para gestão do banco de dados e revelou-se um objecto poderoso, com imensas propriedades, imensos pormenores. Um DataSet acaba por ser um conjunto de tabelas da BD, onde são guardadas todas as linhas devolvidas pela instrução SQL. Estes dados são então tratados offline, ou seja, os dados podem ser alterados no dataset e não interfere com os dados existentes no banco de dados. Isto é muito útil para a manipulação de dados, controlo de cache, entre outras situações.

No entanto, depressa cheguei à conclusão que isto consumia muitos recursos, tanto é que o DataSet tem imensa informação desnecessária. Tive a ver e o payload do DataSet é simplesmente enorme.

Procurei uma solução. DataReader surgiu como a alternativa. Ora qual a diferença entre o DataReader e o DataSet? Primeiro que tudo, o DataReader trata os dados online, ao contrário do DataSet. Este objecto funciona como stream para o banco de dados e deve ser fechado depois de executados os comandos pretendidos. Esta é uma solução muito mais viável a nível de recursos, visto que consome muito, mas muito menos que o DataSet. Desvantagem? A flexibilidade é a grande desvantagem. Ao contrário do DataSet em que se pode manipular os dados directamente, o DataReader funciona como forward-only, ou seja, funciona como um array de dados que só pode estar a apontar para uma linha apenas, e só num sentido.


What is a DataReader?
A DataReader is a read-only stream of data returned from the database as the query executes. It only contains one row of data in memory at a time and is restricted to navigating forward only in the results one record at a time. The DataReader does support access to multiple result sets, but only one at a time and in the order retrieved. Just as in the original version of ADO, the data is no longer available through the DataReader once the connection to the data source is closed, which means a DataReader requires a connection to the database throughout its usage. Output parameters or return values are only available through the DataReader once the connection is closed.

What is a DataSet?
DataSet is the core of the ADO.NET disconnected architecture and is used to store data in a disconnected state..



Basicamente, estamos a falar dum cenário assim:

  • Data Reader - Forward only where as Dataset - Can loop through datas
  • Data Reader - Connected Recordset where as DataSet - Disconnected Recordset
  • Data Reader - Less Memory Occupying where as DataSet - It occupies more memory
  • Data Reader - Only Single Table can be used where as Dataset - Datatable Concept allows data to be stored in multiple tables.
  • Data Reader - Read only where as DataSet - Can add/update/delete using the dataset
  • Data Reader - No relationship can be maintained where as DataSet - Relationship can be maintained.
  • Data Reader - No Xml Storage available where as DataSet - Can be stored as XML.

De seguida, mostro um excelente artigo de Scott Mitchell, um dos fundadores do 4GuysFromRolla.

Agenda Cultural

Smackdown LIVE @ Pavilhão Atlântico
24/09/2008





dEUS
Em Outubro



Sigur Rós @ Campo Pequeno

11/11/200


domingo, agosto 03, 2008

dEUS voltam a Portugal em Outubro

Tom Barman anunciou, esta noite em Paredes de Coura, concertos no Porto e em Lisboa. Veja alinhamento do concerto no festival.
Os dEUS vão voltar a Portugal no próximo mês de Outubro.

O anúncio foi feito esta noite, durante o concerto da banda belga em Paredes de Coura.

No final daquele que foi um dos melhores espectáculos do festival até ao momento, Tom Barman revelou que os dEUS tocam no Porto e em Lisboa em Outubro.

Recorde-se que, no começo do ano, Tom Barman disse, em entrevista à BLITZ, que os dEUS tocariam em Paredes de Coura e em salas fechadas de Lisboa e Porto, no Outono.

Fica o alinhamento do concerto dos dEUS em Paredes de Coura (2 de Agosto de 2008):

Slow
Instant Street
Feel Off The Floor, Man
Is A Robot
Turnpike
The Architect
Favourite Game
Slow
Smoker's Reflect
Nothing Really Ends
Bad Timing
Suds and Soda

Encore

Roses
Oh Your God
Serpentine

domingo, julho 27, 2008

Festival Atlântico Rock: Day Two

NUNO LEAN


Se eu comparar o concerto de abertura da noite de hoje com o de ontem, Nuno Lean dava 15-0. Em grande nível. Um rock a fazer lembrar os tempos do blues dos anos 60 (riffs à chuck berry). E depois aquela gaita de foles encaixou na perfeição. Excelente abertura. Este rapaz toca de c******. 15/20


DAPUNKSPORTIF


Eu já tinha visto Dapunksportif 2 vezes, uma no SBSR em 2006 e outra na Recepção de Leiria 2007. E posso garantir que o concerto desta noite foi de longe o melhor. Grande entrega, grandes malhas. A banda de Peniche mexeu com a malta, presenteando com um excelente concerto. Muito bom. Destaque para My World Got Itself in a Hurry, I Can't Move e Summer Boys, que fechou com chave de ouro. 16/20


DESPE & SIGA


Ahahahah é a paródia total. Nunca pensei ver uma legião de fãs tão grande dos Despe. A banda em palco é mesmo o riso. O Almendra é um autêntico monstro em palco. E claro, estiveram presentes os grandes clássicos. Apesar de ser a apresentação do novo album "Cai no Real", tivemos direito a Sol da Caparica, Paulinha, Ao Trabalho, Chuta Cavalo, entre outras. 15/20


TARA PERDIDA


Ok, não vale a pena falar muito. Esta banda é algo fora do normal ao vivo. São Martinho estremeceu. Um alinhamento de chorar por mais. Toda a banda não comprometeu e Ribas, esse senhor, mostrou como se deve puxar pela malta. Desde Realidade, Acreditar, Até M'Embebedar, Desalinhado, Batata Frita, Quanto mais eu Grito, até às mais recentes do novo album "Nada a Esconder". Ribas confessou que estava emocionado com a malta que já sabia as letras do novo album. Os Tara deram-nos Cidade, Sentimento Ingénuo, Pernas Pró Ar, Memórias, 3 de Maio, Olá Sou Eu e Podia ser Dr.
Para o final, já em encore, guardaram-nos 30 Dias e Nasci Hoje. O concerto durou cerca de 1 hora e meia, e a meu ver, faltaram apenas 2 musicas: Tara Perdida e Patrícia.
Um concerto fantástico, ainda estou um bocadinho incrédulo e espantado com a potência deste grupo de punk rock. Para mais tarde recordar. 19/20


Em geral, este foi um dia para mais tarde recordar. 3 grandes concertos e um que perdurá como um dos melhores que alguma vez vi. Para o ano, ficarei à espera de um cartaz ainda mais poderoso.

sábado, julho 26, 2008

Festival Atlântico Rock: Day One

MONOMONKEY


É sempre complicado ser uma banda pequenina e abrir um festival com nomes muito maiores. E ainda por cima, os Monomonkey apanharam uma casa ainda meia despida. Quanto à musica propriamente dita, não me surpreenderam. Um rock completamente banal. Tiveram os seus momentos, é verdade, mas nunca conseguiram mexer a malta. 11/20


MURDERING TRIPPING BLUES


Ok, cuidado. Apanharam-me completamente desprevenido. Uma banda composta apenas por um baterista, um vocalista/guitarrista e uma rapariga (linda linda linda) nas teclas. E mai' nada. Henry Leone Johnson, o vocalista, tem uma impressionante presença em palco. Algo mesmo surreal. O homem transpira rock n' roll. Meteu a malta a mexer, um rock a fazer lembrar White Stripes. Grandes riffs, bom baterista, excelente concerto. Gostei imenso. 16/20


KALASHNIKOV


AHAHAHHAAH LOUCURA! Melhor mosh de toda a minha vida. Impressionante como toda a malta estava tão bem preparada, todas as letras estavam na ponta da língua. E Jel? Uiiii, o homem é doido. Desde discursos de anarquia total, até incentivar a malta a fazer a Wall of Death, tudo era válido. Depois o final com um cheirinho de Seek and Destroy. Um concerto memorável. Espectacular. UH! AH! WARRIORS OF THE HERZEBOLAH! 17.5/20


FONZIE


Estes coitados tiveram um grande azar. É que depois de Kalashnikov acabar, a malta estava estoirada. E muitos abandonaram a frente do recinto. Ficou a sensação que os verdadeiros cabeças de série estavam trocados (a meu ver, não). No entanto, à 2ª,3ª musica, já os Fonzie tinham conquistado o publico. Excelente concerto, ao nível do que já tinha visto deles em Leiria, já há 2 anos. Grandes momentos, como Drive My Vespa to the Movies, Sorry, Shout it Out, Say Hello, Crashin Down, Wake Up Call, entre outras. Um bom alinhamento, que fechou com a inevitável Gotta Get Away. Grande concerto. 17/20


Em geral, foi um grande dia de musica. Fica na memória a loucura durante o concerto de Kalashnikov, algo divinal mesmo. Até levantou poeira. E claro, fica também na memória o grande concerto de Fonzie, com excelentes momentos. Só o dia de hoje valeu os 10 €. Vamos ver como vai ser amanhã, que em perspectiva será melhor ainda: "SOMOS TARA PERDIDA!".