开发者

naming conventions for buttons in user interface

User interface for web applications in general contain various buttons for performing CRUD operations. What would be the suggested naming conventi开发者_Python百科on for button labels while performing the following actions..

  • User creation (Add User... or Add User or Add user)
  • Event creation (Add Event... or Add Event or Add event)
  • View users button (List All Users or List All users or List all users )

Most of the sites seem to contain the last option (e.g. Add user) where the first alphabet in the word is capitalized and rest all are lower case). What would be a better practice here?


It's a question of taste and personal preferences. The most important thing is to be consistent all over the application.


As I understood the question it's regarding the button label, not the name in the code.

"Add user…": An action ending in an ellipsis (…) (I always prefer an ellipsis over three dots) normally indicates "something more", e.g. a dialog box popping up with a form or more questions before the action is performed.

"Add User" I see as just bad writing. Unless perhaps it's in german where all nouns are capitalized. =)

I'd go for "Add user", if it's the last step in the flow/process of creating the user.


Well certainly in .Net Button controls I always use

BtnEventName

But this is a general convention for any control in .Net for example a TextBox would be

TxtUserName

Major benefit of this is that controls of the same type are grouped in intellisense


Depends, in swing I use, :

JTextField txtUserField; // description about the inputType + description of what it actually is.!
JButton butSubmit;

For a j2ee application ,

HTML : <input type="button" name="butUserName"/>

Beans : It is HIGHLY recommended to name the input field exactly as it is named in the HTML forms. (like in struts, in the form bean String butUserName;)

in jsp/servlets: same....... String butUserName = request.getParameter("butUserName");

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜