conventions

Durandal and ASP.NET MVC conventions

北战南征 提交于 2019-12-03 06:13:31
I'm currently evaluating Durandal for use in an enterprise ASP.NET MVC application. However the default conventions used by Durandal seem to conflict with the MVC conventions I've grown accustomed to. The HotTowel MVC template by John Papa is great, but this too seems to "do away" with MVC conventions in favour of Durandals by putting things in an App folder. A couple of the issues I have with these conventions are: Views are potentially split across two locations (/App/views and /Views). Scripts are also split across two locations (/App/durandal and /Scripts). Views are not in the default MVC

An Ideal Folder Structure for .NET MVC [closed]

空扰寡人 提交于 2019-12-03 01:39:48
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . When I started in .NET Webforms I didn't have much trouble finding a folder structure to follow since VS offered you application

Good Haskell coding standards

孤街浪徒 提交于 2019-12-03 01:30:52
问题 Could someone provide a link to a good coding standard for Haskell? I've found this and this, but they are far from comprehensive. Not to mention that the HaskellWiki one includes such "gems" as "use classes with care" and "defining symbolic infix identifiers should be left to library writers only." 回答1: Really hard question. I hope your answers turn up something good. Meanwhile, here is a catalog of mistakes or other annoying things that I have found in beginners' code. There is some overlap

Where to place private methods in Ruby?

 ̄綄美尐妖づ 提交于 2019-12-03 00:44:16
问题 Most of the blogs or tutorials or books have private methods at the bottom of any class/module. Is this the best practice? I find having private methods as and when necessary more convenient. For example: public def my_method # do something minion_method end private def minion_method # do something end public def next_method end This way I find the code more readable instead of scrolling up and down continuously which is very irritating. Is there something terribly wrong in this approach? Is

List of de facto standard keyboard shortcuts for Windows apps?

时光怂恿深爱的人放手 提交于 2019-12-02 23:39:27
Let's say I'm developing a new desktop application for Windows. Is there a list somewhere that I can consult (either from Microsoft or a 3rd party) of keyboard shortcuts that all Windows applications should support? (Note: When I say "all Windows applications" here, I really mean "all Windows applications where a particular keyboard shortcut makes sense." For example, a standard "Begin debug session" shortcut might make sense across IDE applications such as Visual Studio and Eclipse, but not for other types of applications such as Notepad or Firefox. Also, it might not make sense for certain

Laravel 4 Controller Templating / Blade - Correct method? [closed]

人盡茶涼 提交于 2019-12-02 18:08:37
I've been reading through the Laravel 4 documentation and have been making a demo application to help with learning. I couldn't find much documentation on the templating of views with blade and controllers. Which is the correct method or does it come down to personal preference? E.g. 1 Controllers/HomeController.php protected $layout = 'layouts.main'; public function showWelcome() { $this->layout->title = "Page Title"; $this->layout->content = View::make('welcome'); } Views/layouts/main.blade.php <html> <head> <title>{{ $title }}</title> </head> <body> {{ $content }} </body> </html> Views

An Ideal Folder Structure for .NET MVC [closed]

蓝咒 提交于 2019-12-02 15:31:47
When I started in .NET Webforms I didn't have much trouble finding a folder structure to follow since VS offered you application folders like "App_Code" and most app examples put "BLL", "DAL" inside there and so on. But now in MVC, every example I check uses different structure, like no standards this time and I haven't found a good solution on Google or SO. So, maybe we can share how we organize our MVC projects, may help others to make their own mind. Here is the structure for small to medium projects I use: App_Data Areas Admin Controllers Models Views MyAccount Controllers Models Views

Summary of Ruby on Rails fundamental concepts

萝らか妹 提交于 2019-12-02 13:52:18
Being new to Rails, I am having a difficult time finding a website or reference that gives a run down summary of Ruby on Rails. I understand MVC, ActiveRecord, and that sort of stuff on a basic level, but I am having a hard time understanding some of the relationships and fundamentals. For instance: What are all naming conventions I need to be aware of? How should controller actions be structured and named? What are the best ways to render information in a view (via :content_for or render a partial) and what are ways I shouldn't use? What should go into a helper and what shouldn't? What are

Good Haskell coding standards

独自空忆成欢 提交于 2019-12-02 13:48:57
Could someone provide a link to a good coding standard for Haskell? I've found this and this , but they are far from comprehensive. Not to mention that the HaskellWiki one includes such "gems" as "use classes with care" and "defining symbolic infix identifiers should be left to library writers only." Norman Ramsey Really hard question. I hope your answers turn up something good. Meanwhile, here is a catalog of mistakes or other annoying things that I have found in beginners' code. There is some overlap with the Cal Tech style page that Kornel Kisielewicz points to. Some of my advice is every

Why do some people use keywords for the clauses in the loop macro?

家住魔仙堡 提交于 2019-12-02 00:12:30
问题 Does it solve any problem? According to the first footnote of PCL, if not a keyword it interns the symbol in the current package. As all keywords are interned in the keyword package it would prevent multiple symbols being interned in different packages. But are there any other advantages? What problems does it create? (I'm guessing there must be a problem as it is not the prevalent convention) 回答1: No, the only advantage is to not end up with extra symbols in whatever package your code is