www.ngonchan.blogspot.com:

14 Tips To Make A Better Portfolio Website



Here is some tips to make your portfolio better, these tips was posted by Michael on http://www.webdesigndev.com. Hope this post will useful for you, who want  to introduce yourself via a  good portfolio :)

Over the last 5 years I have used dozens if not 100’s of designers and found some designers get their portfolio very wrong! You got to expect your websites visitors and clients to be completely uneducated in how to use websites, there for make it idiot proof! Here is a list of 14 tips and suggestions for your online portfolio.

Make it easy for people to contact you


This is my number one point, so often when looking for work to be done I can’t find out a easy way to contact the design. You need to make it easy for people to contact you, there is no point having an amazing portfolio if no one can contact you for work. Don’t just have one form of contact either. You can list your email, phone numbers, and also be contactable via social networks such as Twitter and Facebook. Also another idea is to tell them when they can expect to hear back from you, often potential clients want to start ASAP and so if they can expect to hear from you sooner then other designers then they may pick you over them.

Make it clear who you are


On your portfolio, you need to make it clear who you are. Remember to list your previous experience, so clients know who you have worked with and on what types of projects, etc. Its also useful to list your time zone so clients know what hours you are up and where about in the world you are located.

Your work speaks for itself


Make sure you have a strong portfolio. Don’t list every bit of work in your portfolio, especially if its similar. Display the best, and you will sell yourself at a high standard.

portfolio

Make it clear what you’re offering


Make it clear to the client what you are actually offering to them. There’s no point in getting to the mid project stage and the client saying, can you buy this domain for me then, if you didn’t make it clear that you aren’t buying the domain but just hosting it, etc.

Make your prices are clear


Make your prices clear on your portfolio. You could say web design 5 pages for $… so that its clear for customers to know what they are actually paying. When working with potential clients they are sometimes don’t see the value in your service and don’t expect to pay very much, so if you are a high end designer, make it clear you are and your average rates. A great example of making it clear how much work will cost is PSD2HTML.

Make your portfolio perfect


If your portfolio is perfect, your customers will think that their website can be the same. This doesn’t just include spelling mistakes, but the navigation, user interface and cross browser compatibility.

Full size previews


On your portfolio, make sure if you are displaying thumbnails that they link to a full size preview of the design. Your customers don’t want to strain their eyes, and plus a full screen size makes sure clients can see your full potential.

design-preview

Make it clear your a real person


On your portfolio, come across as a real person. Maybe put a picture up of yourself, so clients know that they are working with a real person. Often potential clients are put of thinking you make scam them, make sure your clear this won’t happen because your a real person offering real services.

Explain the process


Clients can always get confused about the process, because every designer is different. You could provide a diagram of how you complete the design process with clients. For example, the design faze, drafts, deposits and so on…

Upsell the client with services they actually need


Maybe on the page where clients get a quote from you, you could sell the client services they might actually need. This maybe domain names, hosting, or website management.

If you have been featured by a big company, show off


Designers around the world have been featured all over the place, in newspaper, magazines, news websites and have been interviewed. This adds to your credibility and so its important to show it off!

If you work with a big client, show off


The same goes for if you actually work with a big client. Say if you designed a posted for Sony’s Playstation 3, why not show off the fact that Sony is one of your clients.

clients

Testimonials, Let your past clients write a personal recommendation


By all means let your clients write a statement about your services, and what working with you was like. I’m sure when displaying the testimonials you can link back to their company. Its a win win situation for both you and the client.

Call to action


If you offer a call to action, clients are more likely to buy your services. Such as if you say 10% discount if you order a logo design by a certain date or ask them to fill out a form asking for a quote.


Read More Add your Comment 1 nhận xét


CSS3 rounded corners for every browser? An alternative quick solution without headache



Here is a really nice post by Antonio Lupetti at http://woork.blogspot.com. Thanks for great post.


In the last weeks I frequently received a question about how to use CSS3 border-radius property to draw HTML elements with rounded corners in Internet Explorer. How you know CSS3 border-radius property is natively supported in Safari, Firefox and Chrome but for some mysterious reason this property is not supported in Internet Explorer.

So to draw rounded corners in IE you have to use some trick, for example using CSS classes with a background image (take a look at this post).

The simpler and quick solution I know to draw rounded corners in every browser is to use a mix of CSS3 and JavaScript. CurvyCorners is a free JavaScript library for creating gorgeous rounded corners for HTML elements. The final result looks like this:


The big advantage of this script is that lets render rounded borders in Safari, Chrome and Mozilla (which support rounded borders via -webkit-border-radius and -moz-border-radius) natively with CSS3 property and in IE and Opera with JavaScript.

The only thing you have to do is to include curvycorners.js into the <head> tag of your page:
<script type="text/javascript" src="curvycorners.js"></script>

Then you have to write a CSS class like this:
.roundedCorners{
width: 220px;
padding: 10px;
background-color: #DDEEF6;
border:1px solid #DDEEF6;

/* Do rounding (native in Safari, Firefox and Chrome) */
-webkit-border-radius: 6px;
-moz-border-radius: 6px;

}

At this point add the following code into the <head> of your page, after the previous CSS code:
<script type="text/JavaScript">
addEvent(window, 'load', initCorners);
function initCorners() {
var setting = {
tl: { radius: 6 },
tr: { radius: 6 },
bl: { radius: 6 },
br: { radius: 6 },
antiAlias: true
}
curvyCorners(setting, ".roundedCorners");
}


</script>

tl, tr, bl, br are: top-left, top-right, bottom-left, bottom-right borders.

If you have different CSS classes (ex. roundedCorners, roundedCorners_1, roundedCorners_2) you can apply them changing the previous code in this way:
...
curvyCorners(setting, ".roundedCorners");
curvyCorners(setting, ".roundedCorners_1");
curvyCorners(setting, ".roundedCorners_2");
...

Now if you want to apply rounded corners to a DIV element use this code:
<div class="roundedCorners"> </div>

This is the result in every browser:

I think this is actually the simpler and quick solution to implement rounded corners in every browser. Ok... and what's if JavaScript is disabled? Sincerly I think this case is not so frequent... but if you don't want to use JavaScript, the most realiable solution is to use CSS classes with background images. Any suggestion about this topic? Please leave a comment, thanks!

Download the source code here:


Related Posts

You can also take a look at these posts I wrote some time ago about similar topics:

- Liquid styled input element with CSS
- Clean Tab Bar Digg-like using CSS
- Liquid expandable section with rounded corners using CSS
- Liquid layer with rounded corners using css


Read More Add your Comment 7 nhận xét


Extjs quick start guide for jQuery Developers



I'm a big fan of jQuery and I always use jQuery for my projects, but, when I changed my job and came to my current workplace, I must use ExtJs, another really cool Js framework. This took me alot of time :( since I've read the tutorial named "Extjs quick start guide for jQuery Developers" written by Anis Ahmad at http://www.ajaxray.com. Hope it can help you :) ( The original post here. Thanks Anis Ahmad.  )

I’ve seen many people (including myself) trying out the power of jQuery for once and then getting stuck with it. Why not? It’s one of the coolest and smartest JavaScript library out there. However, I have broken out from the circle and found that Extjs is another great mentor in the field of JavaScript libraries. Especially, I think it’s UI components are unbeatable (Dojo can be a nearest candidate).

If you are habituated to think JavaScript coding in the syntax of jQuery, you can start working with ExtJS right now (with a few twist)!  What you need is some little tuning in concept and syntax. Today I will be trying to explain how to do this in 6 important points :


  1. Document is ready - How to get the our document ready and where to start.

  2. Selecting elements - How to select elements in Ext.

  3. Dom scripting - Changing on and in the element.

  4. Ext events - Assigning and firing events.

  5. Ext Components - The powerful alternate of jQuery UI.

  6. Ajax - Making Ajax request in Ext.


Ok, let’s dive in to deep of each of these points.

Document is ready


First of all, you need to download, extract and set up the page for using Ext. Remember to download the API Documentation as well.

Now, here is how we setup jQuery and register a ready event for the document in jQuery:

<script type="text/javascript">
$(document).ready(function() {
// do stuff when DOM is ready
});
</script>


To do the same thing in Ext, you have to include default ext css, an adapter and the Ext itself. See the difference at the point of $(document).ready(). When the DOM is ready, Ext fires the Ext.onReady() event.

<script type="text/javascript">
Ext.onReady(function() {
// do stuff when DOM is ready
});
</script>


Selecting elements


To take any action, you have to select the element first. In jQuery, simply $(’css-selector’) does everything. It works for a single element by ID, some elements by tag name/class or any complex selection with virtual selectors. But in Extjs, two different methods are used for selecting a single element by ID and other combined multiple element.

Selecting by id in Extjs is done by Ext.get() method. Here is an example of selecting an element and performing some action on it.

// Selecting by ID in jQuery
var myDiv = $("#element-id");

// Selecting by ID in Extjs
var myDiv = Ext.get('element-id');

// Perform some action on it
// Add a class
myDiv.addClass('my-class');
// Set the width 100 px,
// true is for applying default animation on change
myDiv.setWidth(100, true);
// Retrive some information of the element
// Get the elements box info as object {x, y, width, height}
var box = myDiv.getBox();


See the Ext.Element class in API Doc to know what more actions you can perform on an element.

On other hand, Ext.select() method is used to select other CSS selection. Here is an example:

// Select elements with CSS Selector
var imgs = Ext.select("#my-div div.member img");
// or select directly from an existing element
var members = Ext.get('my-div');
var imgs = members.select('div.member img');

// Now, any Ext.Element actions can be performed on all the elements in this collection


Please note these points about selected Ext elements:

  • Ext.get() returns Ext.Element object and Ext.select() returns Ext.CompositeElement object.

  • All Ext.Element actions can be performed on Ext.CompositeElement object

  • The actions performed on DOM nodes can be chained.

  • Ext.select() uses the powerful DomQuery class for selecting. See this class for using virtual selectors and more.


Dom scripting


Like jQuery, ext has easy methods for perform insertion, deletion,  moving, copying etc on selected element(s). Ext.Element class has functions for performing common tasks.

var el1 = Ext.get("my-1st-div");
var el2 = Ext.get("my-2nd-div");

// Appending elements
el1.appendChild("<p>A new paragraph</p>").appendTo(el2)

// Replcing, removing
var el3 = Ext.get("my-3rd-div");
Ext.get("my-4th-div").replace(el3).insertAfter(el2);

el2.remove()


See the Ext.Element class for more functions like these. To extending the power of DOM scripting,  see the Ext.DomHelper class.

Ext events


First the easiest example. See how we do in jQuery and how to do in Ext.

// Binding an event in jQuery 
$(".btn").click(function() {
// Do something on button click
});

// Binding an event in Extjs
Ext.select('.btn').on('click', function() {
// Do something on button click
});


So, instate of binding with functions with event name, we will bind with Element.on() function of Ext.Element class. The 1st parameter of Element.on() is the event name and the 2nd is a function name or an anonymous function.

See the Ext.EventManager and  Ext.EventObject classes for complex event handling.

Ext Components


Ext has dozens of extensive UI Components. All they are extended from Ext.Component class. There are BoxComponent, Button, ColorPalette, DataView, DatePicker, Editor, ProgressBar, Slider, TabPanel, Tree, many kinds of Grids, Toolbars, Menus, Form components and much more. Each of this components needs separate tutorials to learn. So, I am not going to describe it in this little scope. See this page for component specific tutorials.

http://extjs.com/learn/Tutorials

Ajax


Ajax requests are handled in Ext.Ajax class. Sending basic Ajax request in Extjs is very similar to jQuery-








// Basic request in jQuery
$.ajax({
type: "POST",
url: "myurl.php",
data: { foo: 'bar' },
success: function(msg){
alert( "Data Saved: " + msg );
}
});



// Basic request in Ext
Ext.Ajax.request({
url: 'myurl.php',
params: { foo: 'bar' },
success: function(msg){
alert( "Data Saved: " + msg );
}
});


Like the jQuery load function, here is also similar function exist in Ext.Element to insert Ajax response directly into DOM.

// Load Ajax response in directly in jQuery
var msgBox = $('#message');
msgBox.load('myurl.php', {name : $('#name').val()} );

// Load Ajax response in directly in Ext
var msgBox = Ext.get('message');
msg.load({
url: 'myurl.php',
params: 'name=' + Ext.get('name').dom.value,
});


See the Ext.Ajax class for more featured Ajax functions of Extjs.

Before ending, here is a surprise for you. Though you cannot leave jQuery for a moment, you are not going to miss the power of Ext. These tutorials describe how to use Ext with jQuery -

http://docs.jquery.com/Tutorials:Using_Ext_With_jQuery.

http://filchiprogrammer.wordpress.com/2007/12/27/combination-of-ext-and-jquery/

http://blog.jquery.com/2007/02/19/jquery-and-jack-slocums-ext/

See you soon.


Read More Add your Comment 1 nhận xét


Keyboard navigation with JavaScript and jQuery



Martin Grill at http://arrglarks.de had posted a great tutorial about keyboard navigator with jQuery here.
You can read that tutorial here also :). Thanks Martin Grill for the post :

I had to add functionality for keyboard navigation to my latest project at work recently. It started out with the need to disable the browser’s postback when someone hits ENTER in a formular. Of course more had to be added once our usability guy realized that theoretically eliminates the need for a mouse. The following example is a bit more basic though and covers only what’s need to understand the concepts.

First of all we have to register the event on the document. Unfortunately keypressed isn’t supported on all browsers and keyup is a little too late to prevent all browser functions so we have to go with keydown.



$(document).keydown(function(event){



For cross-browser compatibility two properties of the event need to be checked: event.keyCode and event.which.


    var key = event.keyCode || event.which;



And the last thing you have to know is whether the focus is on a textbox or a textarea. Otherwise we can screw up the ability to edit text very easy if we work with ENTER, DELETE or BACKSPACE. The check is done by looking at event.target.type.


    if(event.target.type !== 'textarea'){



For the rest of the example, let’s say we have three buttons on our page, selected by jQuery, which get shown and hidden dynamically according to the context: one back button, $back, one forward button, $forward and one button to submit the form, $save.


        //ENTER
if (key === 13) {

//The button has to be visible to be used.
if ($save.is(':visible')) {
$save.click();
} else if ($forward.is(':visible')) {
$forward.click();
}

//Preventing any other action by the browser
//even if no button is visible
return false;
}

//Not in a textarea or textbox
if (event.target.type !== 'text') {

//BACKSPACE
if (key === 8) {

//SHIFT is also pressed
if (event.shiftKey) {
if ($forward.is(':visible')) {
$forward.click();
}
} else {
if ($back.is(':visible')) {
$back.click();
}
}

return false;
}
}
}
});



That’s it, our application’s enhanced with a few simple keyboard commands.

A little tip at the end: To make your code easier to write and understand here’s a handy object maps the real key codes of the most important special keys to easy to use constants. Just put it in front of the rest of your code.


var keyCode = {
BACKSPACE: 8,
CAPS_LOCK: 20,
COMMA: 188,
CONTROL: 17,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
INSERT: 45,
LEFT: 37,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SHIFT: 16,
SPACE: 32,
TAB: 9,
UP: 38
}



Read More Add your Comment 2 nhận xét


10 Tips for Writing Better jQuery Code



This tutorial was written by Giulio Bai at here :)



jquery-tips

jQuery is totally cool. I’ve been using it for a year now and I find myself constantly learning new tricks and running into great improvements.
 The amount of plug-ins and resources out there is great, too, making this powerful javascript library either a must-use (for many developers) or a very-cool-thing-I-like for the others.

 However, many people want to know how to write better code. 

Here, my friend, are some tips.

1. $(document).ready () All The Way


Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded. It lets you attach events to any alements in the page without directly interfering with the mark-up; all those annoying onload, onclick and onwhatever stuff isn’t needed anymore; just write it in here. An example with created-on-the-spot functions, which keeps everything very compact and quite understandable, could be


$(document).ready (function () {
$(".dummy").click (function () {
$(this).css ('color', '#000000');
});
});



2. Use $(window).load ()


Even though the vast majority of examples come with the wide-spread $(document).ready () pseudo event, you better avoid putting everything in it.

The latter is incredibly useful, but occurs during page render, while objects are still downloading. Superfluous functionality such as scrolling, drag and drop, etc, could be put inside the $(window).load () function, which executes after all of the objects have downloaded and avoids stalling during page loading.

Syntax is the same as the well-known $(document).ready () event


$(window).load (function () {
// my scrolling methods
});



3. Load Only What You Really Need


Everyone is tempted to write all of the JS code for the website in one place and then copy it over. jQuery takes time to look elements up, even if they don’t exist, and this slow things down.

There are two ways I would suggest you can get around this awful situation. The simplest one would be to just tag the body with a name (the page name, for example) and run the code needed by the page only.


$(document).ready (function () {
if ('body').hasClass ('home') {
// home page code
}
else if ('body').hasClass ('blog') {
// blog code
}

// and so on
});



The other method, a bit trickier to me, is to build a library and call the code you need on every page.


// global JS library
var jslib =
{
home:
{
init: function () {
// home page code
}
},

blog:
{
init: function () {
// blog code
}
}

// and so on
}





<!-- html page -->
<script type="text/javascript"><!--mce:0--></script>



4. Learn What The ‘data’ Method Is And Use It


I see this all the time; people don’t think about this and always write stuff like


$('.myselector').attr ('alt', 'orange');



to store (and associate) some miscellaneous data in DOM. This is technically incorrect, as well as rather confusing for someone alien to the original programmer’s thoughts.

jQuery actually provides a method to store data in DOM, which is data. The above example would then become:


$('.myselector').data ('myfavcolor', 'orange');
// then retrieved as simply as
$('myselector').data ('myfavcolor');



This method alows you to associate and store data to any element on the page and having a meaningful name to refer to.

5. Built-In Custom Selectors


Being familiar with CSS selectors is a huge help when dealing with jQuery, but being knowledgable about jQuery built-in selectors is a boost for real! Have a look at http://docs.jquery.com/Selectors to find out all of them.

For example, you could use


$("div:contains('hello')").css ('background-color', '#cc0000');



to paint red all the divs containing the word “hello”, or


$('input:password')



to match all the password fields.

6. Flag With Classes


You can use flags to monitor what the user is doing, or even to check whether a particular thing has been done or not. The addClass method comes in handy this time, providing a easy way to add a new class to an element. You can later check the existence of the class (thus the flag) with the hasClass function.

A very common use of flags is whenever the application has two or more working modes; upon entering the second mode, the flag is set to a predetermined element and, when needed, the hasClass method is used to check the current working mode. That easy!


function editModeOn ()
{
// turns on edit mode and sets a flag
$('#flags').addClass ("editModeOn");
// do other cool things
}

function saveData ()
{
// to save data, first exit edit mode (if editing)
if ($('#flags').hasClass ('editModeOn')) {
exitEditMode ();
$('#flags').removeClass ('editModeOn');
}

save ();
}



7. Don’t Call the Same Selector Hundreds of Times


Yeah, don’t do it, really. Instead of


$('p.hello').css ('color', '#000000');
$('p.hello').text ('hello');
$('p.hello').addClass ('paragraph');
$('p.hello').fadeTo (1000, 1);



go with


var $p = $('p.hello');
$p.css ('color', '#000000');
$p.text ('hello');
$p.addClass ('paragraph');
$p.fadeTo (1000, 1);



This will cache the variable and keep it ready for quick reuse.

8. Chain (Almost) Everything


Chaining is extremely useful. The above code could be re-written as


$('p.hello').css ('color', '#000000').text ('hello').addClass ('paragraph').fadeTo (1000, 1);



Beware chaining could slow things down a bit though.

9. toggleClass Utility


You can toggle an element’s class on and off to switch its behaviour without much effort. If your .hidden class won’t display any item, you can show ‘em with


$('p.hidden').toggleClass ();



because the paragraph will now look as if it had the following mark-up


text here



Another point of the toggleClass is that, with the next release of jQuery 1.3.3 the .toggleClass() method will have a couple more modes of operation: [it] will be able to toggle multiple class names and will also be able to toggle all the classes on or off. Here are the different ways you’ll be able to use .toggleClass().- Brandon Aaron


// With the following element
//

// Toggle all classes
$('div').toggleClass(); //
<div>
$('div').toggleClass(); //
<div class="a b c">
$('div').toggleClass( false ); //
<div>
$('div').toggleClass( true ); //
<div class="a b c">

// Toggle multiple classes
$('div').toggleClass( "a b" ); //
<div class="c">
$('div').toggleClass( "a c" ); //
<div class="a">
$('div').toggleClass( "a b c", false ); //
<div>
$('div').toggleClass( "a b c", true ); //</div>
</div>
</div>
</div>
</div>
</div>
</div>



10. Store jQuery Results


When dealing with functions, you might want to have some results available elsewhere; a possible solution is to store results into objects with a global scope, storing them for later usage.


// use the window object for instance
window.$results = {
one : 0,
two : 0
};

// this is the function, perhaps ran more than once
function getResults (first, second)
{
$results.one = first;
$results.two = second;
}

// run function
getResults ($('li.blue'), $('a.red));
$results.one.hasClass ('
blue'); // true
$results.two.hasClass ('
blue'); // false

// run again
getResults ($('
li.red'), $('a.blue));
$results.one.hasClass ('blue'); // false
$results.two.hasClass ('blue'); // true




Read More Add your Comment 4 nhận xét


86 jQuery Resources To Spice Up Your Website



The original topic is here

The second Theme Thursday’s topic was jQuery, yet again another great choice for the week’s theme. As one of my favourite JavaScript libraries i was super pleased it was the chosen topic, it seems im not the only one who loves all things jQuery, as lots of people joined in to share links and resources on the subject.

Future of Theme Thursday

From now on the links to the chosen theme each week will be tweeted from our new dedicated account: @themethursday, so in order for you to see the links you will need to follow that account or you will miss out on all the super useful resources tweeted each week! The reason for this is so as to avoid overwhelming my own followers and it’s also going to be used in conjunction with the website im developing for Theme Thursday (which should be up and running within the next two weeks).

I know you’re here for the jQuery linkage, so here’s the rundown:


Read More Add your Comment 0 nhận xét


Innodb or MyISAM? What's your preference?



Here is the discussion about the difference between InnoDB and MyISAM MySQL engine.
The original discusstion is in MySQLDatabaseAdministration
This discussion answer so many question for me :)
Thanks the authors in this discussion :)

And,  at the last, we should read from begin to the end of the discussion for the best :P

by Frank

I have been reading a lot about Innodb and MyISAM recently. MyISAM offers speed whereas Innodb offers reliability. MyISAM is fast but with no transactions support, Innodb has certain, but very important limitations.

I hate to ask it like this, but what do you prefer for a high volume application with heavy inserts/updates/selects? In your regular job (and projects), do you go for the speed or the reliability? or do you try to find a balance between both by having tables of both kinds?

I am just interested in hearing your thoughts (and igniting a discussion) as to which one is better in the long run?

I have personally used MyISAM and outsourced everything else to my application so far.

Thanks

At 1:23 AM, Blogger Markus Popp said...
If there are many modifications of the data, it's said that InnoDB works faster because it uses row locking instead of table locking, like MyISAM. However, if there are mainly SELECT statements, a MyISAM table might be faster.

However, it's always important what the needs of a specific table are - so I would choose the storage engine that best fits the requirements for the given table. If you need foreign key constraints or transactions, you can only use InnoDB, wheras if you need fulltext indexes, you can only use MyISAM tables at the moment.

With replication it's even possible to take advantage of both storage engines on one table. For example, the master could store a table as InnoDB which makes it fast for INSERTs, UPDATEs and DELETEs while the slave(s) could store the same table as MyISAM and offer the best performance for SELECTs.

At 1:58 AM, Blogger Michael Metz said...
If you have a lot of cncurrent inserts/updates I would recommend inndb since it supports row-locking.
I'm managing a community with more than 5.000 qps Peak (on one DB-Server) and it runs smoothly with innodb while myisam was unable to process the high percentage of inserts/updates (about 50%).



At 2:27 AM, Blogger Frankly Speaking! said...
Thanks Michael,

You are right, for concurrent inserts and updates, one should go for data integrity rather than speed.

Markus, I really appreciate your tip on getting the benefit of both worlds using replication.

Frank

At 9:43 AM, Blogger Markus Popp said...
Unfortunately there's a little uncertainty about the long-term future of InnoDB inside MySQL since Oracle bought Innobase and with it the InnoDB storage engine.

However, I don't think that there will be problems in the short- and mid-terms, and until there *could* be some problems, MySQL should have time enough to create its own storage engine(s) that support everything that InnoDB can do (the plugable architecture should provide good help). At least I think that MySQL should try to keep its independency by providing everything that a high level RDBMS needs by themselves.

At 12:35 PM, Blogger Sheeri said...
What Markus said!

We have lots of different data and usage -- sessions and users tables that get updated frequently, and static data like postal codes.

We currently have a mix -- there's even one set of data (personal ads) that we have 2 tables for -- One table is a copy of the other, and the difference is one is innoDB for fast inserting, and the other is MyISAM for fulltext searching.

InnoDB for most of the tables, including the messaging (short e-mails back and forth) because we need the row-level locking (memory page level locking, really. That's important when you have so many updates per second like we do.)

MyISAM (packed, preferably) for static data -- UK zip code info is over 120M unpacked, and it never changes (and if it does, we just replace the table).

So, yeah, what markus said.

At 2:44 PM, Blogger Frankly Speaking! said...
Thanks Sheeri,

Like Markus and you pointed out, a replication with a dual setup will give the best of both worlds.

Seeing that Innodb is now in Oracle's hands, I think MySQL should start immediately on making the way to get independent from Innodb.

Now I will have to look into the plugable architecture :)

Frank

At 11:50 AM, Anonymous Anonymous said...
I'd go with InnoDB until it's been proved that it's unsuitable. The first reason is reliability. Get a crash with MyISAM and you have the unreliable and slow, related to table size, table repair process. Same thing with InnoDB and you instead get the fixed time, fast and reliable log apply/rollback process. As the data set gets bigger, this matters more and more, as it does if you want to do things like sleep instead of being woken up in the middle of the night to fix a crashed table.

For reliability and performance, we use InnoDB for almost everything at Wikipedia - we just can't afford the downtime implied by MyISAM use and check table for 400GB of data when we get a crash.

The speed advantage of MyISAM is overstated IMO. LiveJournal with a mostly write environment saw a big increase in speed when it switched from MyISAM to InnoDB and they are very happy with InnoDB.

At Wikipedia we achieved some major performance gains by exploiting the way InnoDB clusters records by their primary key. Took some quite common queries from 50 seeks per result page to 1 or 2 seeks per page. Worse, the code at that time allowed people to go back 50,000 rows using LIMIT, causing 50,000 seeks and a DOS vulnerability. Big improvement to working set size from the change as well, so the results were more often in cache. It's so great an advantage that like the write caching it could be a dealbreaker for anything MySQL might do about alternatives to InnoDB.

With InnoDB, if you don't need repeatability, you might also switch to the least consistent transaction isolation level for a particular query, since that can reduce the locking work InnoDB needs to do. That is, assuming that you really do need only the MyISAM lack of guarantees.

On the other hand, a crazy bit of code did once use SELECT ... FOR UPDATE to scan every row of a table. Switching that table to MyISAM was a quick hack until it could be fixed. The table locking of MyISAM was way faster than watching InnoDB lock every row individually.

We used to use MyISAM for fulltext, duplicating the data in the InnoDB master table. Once the query rate grew sufficiently high and the data size grew past a gigabyte or so it became completely unacceptable on performance grounds, taking more than half of our database server capacity and still not working well. We abandoned it and switched to Lucene. By that point we were in the top thousand sites on the net, so it had survived pretty well.

I'm also as MySQL Support Engineer but these views are from my Wikipedia role, not the MySQL one.

James Day

At 5:22 PM, Anonymous Anonymous said...
Newbies use MyISAM for their website because "it's faster".

When you're on your test server and the only user online, sure...

And then people come and sign up and it starts to lock all around the place.

At 7:55 PM, Anonymous Anonymous said...
Given my experience with BOTH innodb and myisam, I'd go with Oracle. Best storage engine under the hood. Cheers!

At 8:50 PM, Blogger Reza said...
Hi Frank,
You have raised an interesting discussion.
I develope large scale applications and I a mix of InnoDB and MyISAM.
My applications always read everything from database, even the copyrights. I use MyISAM for such a thing as the SELECT query is much faster. InnoDB works great when I use it for data such as employees information and so on.
The fact that Michael mentioned to use InnoDB in master and MyISAM in slave is great.
For example, replicate two servers and call both primary DB Servers.
Redirect all requests to a server called Data Handler, and depending on the current usage and traffic, simply redirect the request to one. you could also use priority in the algorithm of redirection.

Cheers,
Rex

At 8:42 PM, Anonymous Richard said...
I have a joining table (with some additional data) that has two foreign keys.

I've recently changed it from using a surrogate key and indexes on each of the foreign key fields, to using a compound primary key on the foreign key fields and deleting the surrogate key.

My concern is having read the comments above, my users are only really seeing the results of select queries. Almost all the inserts and updates are happening behind the scenes via crontab etc.

There's over 3 million rows now and I'm struggling to get the table to convert from MyISAM to InnoDB. I'd like to see if it runs better. Since getting rid of the surrogate key and indexes the front end of the site seems a little slower which is obviously not ideal. :(

At 2:42 PM, Anonymous Anonymous said...
Hi,
i have a DB with aout 50G.
I use mix storage Myisam and InnoDb.
We have something like 500k Updates,500k selects and 100k Insert/delete/replace per hour.
Many full scan becouse of update and
i must say InnOdb it doesnt really work. for the update MyISAM takes 6 minutes innodB needs a couples of hours.
Maybe my installation of INnoDB is not fit

At 4:01 AM, Blogger Jayant Kumar said...
hi, i have been trying to use innodb. Have converted a huge db of around 14 GB from myisam to innodb and put the required index. But the machine (6 GB RAM & 2X2 CPU ) machine is unable to handle the incoming requests. I have hight QPS

Myisam used to work fine.

I have set the innodb_buffer_pool to 2 GB and innodb_thread_concurrency to 8.

Please let me know if there is anything else that i need to do to increase performance.

At 1:42 AM, Anonymous France Hsu said...
Hi!
I want to save logs in DB.
Usually, I use INSERTs and SELECTs, and only DELETEs for the overdue logs. I needed to retain recently 6 month-long logs
In this case, which DB engine is suitable for me?

At 1:43 AM, Anonymous France Hsu said...
Hi!
I want to save logs in DB.
Usually, I use INSERTs and SELECTs, and only DELETEs for the overdue logs. I needed to retain recently 6 month-long logs
In this case, which DB engine is suitable for me?
Thanks.

At 1:48 AM, Anonymous France Hsu said...
Hi!
I want to save logs in DB.
Usually, I use INSERTs and SELECTs, and only DELETEs for the overdue logs. I needed to retain recently 6 month-long logs
In this case, which DB engine is suitable for me?
Thanks.

At 5:20 PM, Anonymous Roebie said...
Having worked with myIsam, InnoDB and Oracle, I would advise PostgreSQL. I've got some tables with >500,000,000 records and >90 fields each. PostgreSQL easily beats Oracle on speed (both select and insert/update) and we have never had any reliability issue since we started with PostgreSQL 3 years ago.
Oh, by the way, even when joining a PostgreSQL table with an Oracle table in our PostgreSQL database, performance is great. Just try that the other way round...

At 9:33 PM, Blogger Emerson said...
Hi!
I used MyISAM for more than 2G row instead of InnoDB. How can we maximize the table row in InnoDB?
-emer

At 7:19 AM, Anonymous Ketan Thaker said...
Thank you all!

I am using both MyISAM and InnoDB database engine in my application as I am using full-text index on product master table and InnoDB for order master table as it is being used by as desktop application running on local server to download orders data from online server to local MySQL server.

Since am dealing with a Database of 2GB in size haven't feel speed issue yet because of proper indexing on the fields.

Thanks,

PS: please advice if I have to update further.

At 4:27 AM, Anonymous Anonymous said...
Hi,

this Blog is very interesting. I have a application running on InnoDB tables. I need transactions only on a few tables, which contains few rows. I use big tables only for reading and I have to make a full load to fill the tables. (The data comes from a flat file)
My problem is that the load needs a lot of time and also to empty the table.
The performance of the application is O.K. but could be better. Is there any difference between InnoDB and MyISAM for the load table? Regards Joern

At 11:47 AM, Anonymous Anonymous said...
I added some of the stuff i learned from this page on the sysadmin wiki if you don't mind:
http://sysadmin.wikia.com/wiki/MySQL


Read More Add your Comment 22 nhận xét


 

About Me

Ảnh của tôi
I'm a web developer who wanna play with PHP (Zend/CodeIgniter/Kohana) MySQL, JS (jQuery, ExtJs, Prototype), CSS and HTML.

Our Partners

© 2010 Thy Trần's home. All Rights Reserved.