homepage Welcome to WebmasterWorld Guest from 54.167.185.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

    
What language is this? (from Beatport.com)
joliett89




msg:4401225
 7:35 pm on Dec 24, 2011 (gmt 0)

Thats from the bottom of the main page with disabled CSS:

[% _.each(data.artists, function(artist){ %] Follow [%=artist.name=%] [% }); %] Follow [%=data.label.name=%]
[% if(data.saleType === 'purchase') { %] [% print(BP.functions.formatCurrency(data.price, "usd")); %] [% } else { %] View Track [% } %]
[% _.each(data, function(item){ %] [% var classes = [], active = '', small = ''; if(item.children){ classes.push('parent'); } if(item.played){ classes.push('played'); } if(item.parentId){ classes.push('child'); small = 'small'; } if(item.queuePosition === (BP.queuePosition||-1) ){ classes.push('active'); active = 'active'; } %]
[% if(item.type == 'track'){ %] [%=item.title=%] [% } else { %] [%=item.name=%] [% } %] [% if(item.artists){ %] [%=BP.functions.renderTemplate('tmpl-player-artists', item )=%] [% } %] [% if(item.label){ %] [%=item.label.name=%] [% } %] [% if(item.releaseDate){ %] [%=item.releaseDate=%] [% } %] [% if(item.type==="track"||item.type==="release"||item.type==="chart"){ %] [%=BP.functions.renderTemplate('tmpl-btn-buy-small', item)=%] [% } %] X
[% }); %]


It looks a little bit like JavaScript, but I am not sure...
By the way, how do you think the website is implemented (music store, about 250k hits per day)?
What programming language do they use (or what would be the best language for a site like that)?
Do they play (preview) tracks from the disk evrytime somebody wants to listen (reference to files in MySQL, but actual files read from a disk etc)?
Just wondering...

Thank you.

 

lucy24




msg:4401265
 12:39 am on Dec 25, 2011 (gmt 0)

Drat. If you had been asking about a human language, I would not rest until I found the answer ;)

I keep slamming into references to the Umbraco CMS, with side excursions into ASP. At first sight I thought you were nuts saying it looks like JavaScript, but it really does, doesn't it? Just wrap all the Javascript braces {} in [% tags %] and you're there. Hmm. Makes it sound like the computer equivalent of pig Latin.

phranque




msg:4401274
 1:17 am on Dec 25, 2011 (gmt 0)

it looks like a templating syntax that didn't get processed on the server side.

joliett89




msg:4401302
 9:13 am on Dec 25, 2011 (gmt 0)

Thats all from the main page, several sections combined.


[% data.size = data.size ? data.size : 'medium'; %] [%=BP.functions.formatCurrency(data.price, "usd") =%]
[% data.size = 'small'; %] [%= BP.functions.renderTemplate('tmpl-btn-buy', data)=%]
[% switch(data.saleType){ case 'mixOnly': print(BP.functions.renderTemplate('tmpl-btn-mix-only',data)); break; case 'albumOnly': print(BP.functions.renderTemplate('tmpl-btn-album-only',data)); break; case 'download': print(BP.functions.renderTemplate('tmpl-btn-promo-dl',data)); break; case 'purchase': data.size = 'small'; print(BP.functions.renderTemplate('tmpl-btn-buy',data)); break; }%]
[% var rendered = []; _.each(data, function(genre){ genre.type = 'genre'; rendered.push( BP.templates['tmpl-item-link']({data:genre}) ); }); %] [%=rendered.join(', ')=%]
[%=data.name=%]
[%=data.title=%]
[%=data.name=%]
[%= BP.functions.renderArtistTemplate( data, 'remixer') =%]
[%= BP.functions.renderArtistTemplate( data, 'artist') =%]
[%=col.displayName=%]
[% _.each(columns, function(col){ print( BP.templates['tmpl-col-edit-row']({ col: col})); }); %]
[% shareHrefs = BP.functions.getShareHrefs(data); %]
[% if(data.filter.custom){ %] [%=BP.functions.renderTemplate('tmpl-filter-menu-custom-date-range', {filter: data.filter } )=%] [% } else { %] [%=BP.functions.renderTemplate('tmpl-filter-menu-group-available', { filter: data.filter })=%] [% } %]
[%=data.groupName=%]
[% _.each(data.group, function(filter, name){ if(filter.applied){ %] [%=BP.functions.renderTemplate('tmpl-filter-menu-group-applied', { filter: filter })=%] [% } else { %] [%=BP.functions.renderTemplate('tmpl-filter-menu-group-available', { filter: filter })=%] [% } %] [% }); %]
[% _.each( data.metadata.facets.fields, function(group, groupName){ %] [%=BP.functions.renderTemplate('tmpl-filter-menu-group', { group: group, groupName: groupName })=%] [% }); %]
[% for( var i in data.metadata.filtering.dateFilters) { var filter = data.metadata.filtering.dateFilters[i]; %] [% if(filter.applied) { %] [%=BP.functions.renderTemplate('tmpl-filter-menu-group-applied', { filter: filter })=%] [% } else { %] [%=BP.functions.renderTemplate('tmpl-filter-menu-date-available', {filter: filter } )=%] [% } %] [% } %]
[% var rendered = []; _.each(data.artists, function(artist){ artist.type = 'artist'; rendered.push( ['',''].join( BP.templates['tmpl-item-link']({data:artist}) )); }); print(rendered.join(', ')); %]

pageoneresults




msg:4401330
 1:17 pm on Dec 25, 2011 (gmt 0)

Do a search in Google for "BP.functions.renderTemplate". Something isn't quite right there. Google is indexing all that stuff. About 8,300,000 results.

joliett89




msg:4401356
 4:52 pm on Dec 25, 2011 (gmt 0)

People said it is a template for asp .net or encoded JavaScript (2 separate answers).

Thats from "View source":

<script type="text/javascript">var BP={};</script>

My guess is that BP might be an object (although I might be confusing it with an array; Beatport player on the top of the page) and JavaScript is encoded in some way?

tangor




msg:4401358
 5:27 pm on Dec 25, 2011 (gmt 0)

I don't use it, but a Bing search suggests the above might be data-json

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved