PDA

View Full Version : beginner studying Feed Viewer



dbdavidson
15 Aug 2012, 12:46 PM
I would like to study the code for Feed Viewer that is displayed at http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/feed-viewer/feed-viewer.html


I have downloaded 4.1.1 and in beginning to study I don't think the code/app I am looking at is the same being displayed on that link. For example the web page has a "Preview" and "Summary" button next to the "Open All" button. So, it looks like the Feed Viewer app on the web page is newer since there are more features. Is this correct? If so, how can I download the source for the app at that link?

Thanks

skirtle
15 Aug 2012, 3:47 PM
I just tried the Feed Viewer example included in the 4.1.1 distribution and those buttons seem to be there. What makes you think they're missing?

dbdavidson
15 Aug 2012, 4:24 PM
In looking closer there is:
.../extjs-4.1.1/examples/app/feed-viewer
and
.../extjs-4.1.1/examples/feed-viewer

My guess is the first one (which I was studying) is an attempt to "port" it to the new recommended
app structure. I am not sure though. In the first there is a file Grid.js which has only:


dockedItems:[{
xtype: 'toolbar',
dock: 'top',
items: [{
iconCls: 'open-all',
text: 'Open All',
action: 'openall'
}]
}]


I have placed this first code under nginx and got the main app to come up - but without the actual feed data showing up. I think my php setup is not correct.

In the latter there is a file FeedDetail.js which seems to have same buttons as the original link. Is that correct and if so a follow up question would be: Given someone is new to extjs, interested in creating a 'border' layout rich internet application, the best code set to study would be the one in the app folder, since it follows the newer recommended approach?

Thanks

skirtle
15 Aug 2012, 4:56 PM
That all sounds about right. If you take a look at the examples list you'll find Feed Viewer is listed twice, once under 'Combination Examples' and again under 'MVC'. Those are the two different versions.

Generally the examples aren't great for learning best practices. From a quick scan over those two examples I'd say you're much better off studying the MVC (app) version - not because it uses the newer MVC structure but because it looks like someone has taken the time to tidy it up. The other one is pretty unhelpful as a learning tool in my opinion, bad practices all over the place.

The MVC itself is a bit of an advanced topic and I would encourage you not to focus on it too soon in your learning effort.

nagalla038
12 Oct 2012, 12:09 AM
Hi, have you tried implementing Feed Viewer code using Json files?

Thanks in Advance




In looking closer there is:
.../extjs-4.1.1/examples/app/feed-viewer
and
.../extjs-4.1.1/examples/feed-viewer

My guess is the first one (which I was studying) is an attempt to "port" it to the new recommended
app structure. I am not sure though. In the first there is a file Grid.js which has only:


dockedItems:[{
xtype: 'toolbar',
dock: 'top',
items: [{
iconCls: 'open-all',
text: 'Open All',
action: 'openall'
}]
}]


I have placed this first code under nginx and got the main app to come up - but without the actual feed data showing up. I think my php setup is not correct.

In the latter there is a file FeedDetail.js which seems to have same buttons as the original link. Is that correct and if so a follow up question would be: Given someone is new to extjs, interested in creating a 'border' layout rich internet application, the best code set to study would be the one in the app folder, since it follows the newer recommended approach?

Thanks