Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

DaveJ

(5,023 posts)
12. Does {{ item }} in that example usually contain a single variable or HTML output?
Fri Apr 5, 2013, 07:00 AM
Apr 2013

Looking at code is helping put my own language into perspective. .Net MVC is not very intuitive, but it's captivating.

For instance, here is a summary of a gallery page. Line 1 is the data source, line 2 automatically uses a Template that was created for that data model:

@model IEnumerable<ScienceShow_MVC.science_pics>
@Html.EditorForModel()

That is an entire HTML page, assuming you have it within a layout page.

This was non-intuitive to me. It looks like I need to create a new model/EditorTemplate combination for each time I want a Template, but that seems to defeat the purpose of templates. Might as well write code for each page.

(but come to think of it, I am using that Template on 3 pages, so I guess it's serving its purpose, I'm just having trouble since this methodology demands an understanding of a lot more than what can be seen)

It's taking me some getting used to this MVC famework. I'm sure its great but I seldom have a chance to take a step back.


So much to learn. I'm not sure if I can fit .Net MVC and Python/Django in my brain at once. But I've got to try it sometime.

the $ugliness-> strikes me every time. nt napoleon_in_rags Mar 2013 #1
It's not the php as much as it is the wordpress plugin Merlot Apr 2013 #2
actually working with wordpress api Phillip McCleod Apr 2013 #3
One of the reasons I dislike WP is the lack of good plugins Merlot Apr 2013 #4
yeh it's work.. Phillip McCleod Apr 2013 #5
"Never mess with WP again." music to my ears Merlot Apr 2013 #6
What usable language? Ruby? DaveJ Apr 2013 #7
negate? no, but mediate? definitely. Phillip McCleod Apr 2013 #8
I'm not opposed to switching frameoworks DaveJ Apr 2013 #9
yep no point switching horses midstream.. Phillip McCleod Apr 2013 #11
Does {{ item }} in that example usually contain a single variable or HTML output? DaveJ Apr 2013 #12
yeh be careful that sounds dangerous.. Phillip McCleod Apr 2013 #13
I suppose nebenaube Apr 2013 #10
haha very funny dr. jones. Phillip McCleod Apr 2013 #14
I know that I'd prefer to work in Perl over PHP. Fortinbras Armstrong Jul 2013 #17
Now that's just weird... nebenaube Jul 2013 #18
PHP arachadillo May 2013 #15
yeh there's no doubt that for all it's faults.. Phillip McCleod May 2013 #16
hrumph... nebenaube Jul 2013 #19
Latest Discussions»Retired Forums»Website, DB, & Software Developers»reviving the 'php sucks' ...»Reply #12