HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Let's spread a word about ocPortal

Login / Search

 [ Join | More ]
 
Posted
Rating:
#71471
Avatar

Fan in training

I dont understand why are you hostile, BobS? I am not insulting anybody, I just came to defend my name as I was afraid I am already judged without chance of defending my point. If its open community, everybody who is not breaking its rules is free to stay and participate in discussions, right?
Back to the top
 
Posted
Rating:
#71472
Avatar

Community saint

Well Raf you entered into the topic that I first met you in posting without first exploring what it was you were trying to discredit. ….judging it before you even knew what it was just like you feel is happening to you here.

Then you continued to try discrediting it with more posts that were quickly shot down and disproved in a respectful and professional manor.

When you failed at that you tried another kick at it from a different angle. Then came here, posted and edited your post after others replied to it.

And you expect to be welcomed in?

….I would say you are doing a very good job of tarnishing your own name/credibility.
Back to the top
 
Posted
Rating:
#71473
Avatar

Community saint

Rafio said

I dont understand why are you hostile, BobS? I am not insulting anybody, I just came to defend my name as I was afraid I am already judged without chance of defending my point. If its open community, everybody who is not breaking its rules is free to stay and participate in discussions, right?
I'm not hostile at all but your intent is transparent. Why do you need to defend your name here. Your battle was elsewhere.

You are obviously free to stay and participate in a civil manner but I think that may not be your intent.

Bob
Back to the top
 
Posted
Rating:
#71474
Avatar

Fan in training

All I did was disagree with you that ocPortal is Enterprise segment solution. Does voicing non-good opinion on something equals to discrediting it? Is opinion of one "nobody-guy" on some forum really so valueable to discredit solution?

People will anyway use what they want to. You suggested I did not gived ocPortal enought time before dropping it and I argued back that I dont like way its written and thats enougt for me to dont use it. I dont need to read code of every file in project to make my mind on its code.
Back to the top
 
Posted
Rating:
#71475
Avatar

Fan in training

BobS said

I think that may not be your intent.

Dont worry Bob, I did not came here to start flamewars. I know that my stance may make people think I am ocPortal hater on campaign against software, but thats misunderstanding caused by somebody's love for it :)
Back to the top
 
Posted
Rating:
#71476
Avatar

Community saint

Ok Raflo….how about we just let this go and start fresh.

Welcome to the community, good to see you here.

You will find this place to be full of some of the most friendly and helpful people on the internet. I hope you enjoy it here  :)
Back to the top
 
Posted
Rating:
#71477
Avatar

Fan in training

Thank you for welcome, Brian! I will propably stay lurker for most of my time here, but I will try participate in discussions about ocPortal development, providing feedback on project.

Also to be little in complicance with what OP posted about, I gived ocPortal on opensourcecms four stars… which sadly did not changed its overal score, but if it has more dedicated fans like you, it should eventually hit five stars rating :)
Back to the top
 
Posted
Rating:
#71479
Avatar

Community saint

Wow, how did you manage to give ocPortal 4 starts with views like this:

Rafia from theadminzone said

functionality aint everything. Code makes ocPortal dinosaur when compared to how software is writen today. Crude look and crude code is most definately not a platform I would use to build website.

No wonder people are having a hard time reading you  O_o .


Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#71486
Avatar

Fan in training

I gived it four stars because it has rich out-of-box functionality. The fact I dont use it doesnt mean others cannot. Uou suggest I should have graded it zero stars? :)


Last edit: by Rafio
Back to the top
 
Posted
Rating:
#71488
Avatar

Community saint

Rafio said

Uou suggest I should have graded it zero stars?
Not at all, just saying that it was unexpected given the few comments I've seen from you.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#71489
Avatar

Funnily enough, the coding style is under review currently. ocPortal has been under a lock down for rearchitecting since version 4, because we have needed to keep things stable. Changing the coding style will lead to a lot of new bugs until things settle down again. I hope to announce something in a few months time, and if so it will be a very significant announcement.

There's some real value in improving the OOP of ocPortal code, but it is not rooted in the features ocPortal has right now. ocPortal's current code serves what ocPortal's current feature-base is very effectively. I am holding off preannouncing features so I am holding off preannouncing anything that those might be built on too ;).

I would say though, programmers often take coding style to be more important than anything else, and it can come across quite anal sometimes. I've worked with some really horrendous code before from other people, and whilst it hasn't been pleasant, it hasn't honestly made any significant difference to my productivity as a developer (maybe 15% worse, which is nothing compared to other factors). I think sometimes it is more of a drive for wanting to see perfection in the industry and work environment, and a way to compare yourself to others in a professional industry that lacks clear metrics, than actual business value. Think of this as a yard stick – does a programmer prefers to work on something beautiful but limited in function, or with a long development history but some rough edges? I think the latter is far preferable, but many many developers prefer the former for the stated reasons. And if you look at the number of PHP Frameworks out there, you can see a lot of developers are seeking this perfection and insist on it being their own brand of it ;).

Regarding 'blockyness' – you can easily not choose blocks in the Setup Wizard. It's a common complaint, but I think it's not rooted in the reality of the CMS industry, it's something that comes outside from people who work with live designs for actual sites designed perhaps directly in Photoshop then implemented from that. Almost the CMS products have some level of blockyness in default themes, even the very popular Wordpress. It is the designers job to take an automated modular layout and make it flow– the product can't do it, because it doesn't know enough about what the final visual hierarchy will be (plus there are other issues, like keeping defaults simple to make things easier to customise).


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#71491
Avatar

Fan in training

I was guessing reason behind a code is its compatibility with old featurebase. Design aside - I assume you have full spearation of look and business logic allowing people to do what they want - it would be really great if this software made a move for OOP code and use gains from PHP 5 constructs (improved Object model and namespaces). If you dont want to write from zero you have platforms like Symfony or ZendFW that provide you with tools for rapid development.

You cannot keep compatibility with PHP 4 forever. Its EOL for 3 years now and PHP 5 brings new stuff that really helps in building and maintaning HUDGE projects.
Back to the top
 
Posted
Rating:
#71492
Avatar

Big hint on Twitter about a week ago ;)

Twitter

I assume you have full spearation of look and business logic allowing people to do what they want

We were one of the first CMS's to do that, and one of the first to use phpdoc documentation throughout, and have our own lint, and we have our own version of PHP that finds XSS vulnerabilities in code, etc etc – so hopefully you can see not using OOP throughout was a pragmatic decision from an earlier point of development, and not an overall indication of code quality. Particular, on PHP4 you could not do method chaining, so going with lots of objects often meant code really got a lot longer than it needed to be, so that was one of the biggest drivers. Before writing ocPortal, I wrote in C++ and Java, and I got a Masters degree in Computer Science, and I have since been a senior engineer elsewhere, so I am certainly not a wannabe-pro ;).

Btw, I noticed you mentioned a particular bit of ugly code was copy&pasted into a lot of files. This was developed over a lot of time as part of our bootstrap code (it's on every script that initiates bootstrapping). It works around a lot of inconsistencies in PHP deployments and avoids making assumptions about execution paths of the various files, for flexibility (the scripts can be moved around to an extent, by non-programmers). It is not well commented because we wanted to minimise how much we copy&pasted.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#71495
Avatar

Fan in training

In most software I saw such code is moved to one "init.php" file included at beginning of every "launcher" or "wrapper script". That way you have just one place to edit if you find better way to start software - DRY is satissfied and you get easier to maintain code.

@Twitter: very cool, I am curious what will you come with :)
Back to the top
 
Posted
Rating:
#71496
Avatar

It's easy to say that if you've been coding for your own servers, but after a few years writing scripts for the masses you find it's quite a different story ;). I'll explain precisely…

  1. We can't use a single init file because the scripts are in different dirs, and this code is what establishes what dir it is in to load.
  2. If we directly enter relative paths, we are then hard-coding the relative position of the file, which we don't want to do. But let's ignore this for a moment and pretend it's ok…
  3. It's also the case we can't assume that the current directory is the same as the script, so another reason we can't directly use relative paths (definitely on some LAMP environments, the current directory can be something completely arbitrary). Some servers have '.' in the include path which allows it to work regardless, but we can't assume that (also 'ini_set' is disabled on some servers, so we can't use ini_set  to put that back in). 'set_include_path' came in in PHP4.3, and we support PHP4.1, so we can't alter the include path like that either.
  4. Further to this, we do need to detect a correct path to the current directory for performance reasons. Often servers will use symbolic links in the path that PHP naturally thinks is the current directory of a web script, so we need to do some work to resolve that, to ensure that symbolic link lookups don't need to be performed every time we do a path reference.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#71497
Avatar

Fan in training

I have three years of experience and I never had any issues with paths in my projects. My code was deployed in different enviroments (BSD/Linux/Windows 3.11 or NT variations), including custom build platforms and trio of dirname + __FILE__ + chdir always did the job for me.
Back to the top
 
Posted
Rating:
#71498
Avatar

But what if you introduce the requirement that non-programmer users should be able to move the individual PHP scripts into different directories, e.g. to protect certain subsets with different .htaccess files. ocPortal is a big system, but it is designed to be very modular, and this is one of the features we have in here. We could document that in the individual files, but that would just increase the amount of copy&pasted code.

I'm trying to get across that it's not great to judge the quality of a project based on applying a set of best practices strictly without considering the full engineering reasons behind why it's done a certain way. Large projects have trade-offs which aren't always immediately apparent.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#71499
Avatar

Fan in training

I understand your point, but I dont see how avoiding comments inside functions and methods is really a trade off as well as I dont see a reason behind calling variables "$a" and "$b". That makes entire thing cryptic and obfuscated for people who want to heavily modify and adapt software to their needs.
Back to the top
 
Posted
Rating:
#71500
Avatar

It is meant to imply the variables are equal of characteristic in a set.

Code

$a=strrpos($FILE_BASE,'/');
if ($a===false) $a=0;
$b=strrpos($FILE_BASE,'\\');
if ($b===false) $b=0;
$FILE_BASE=substr($FILE_BASE,0,($a>$b)?$a:$b);

i.e. "a and b" are similar kinds of things, but the largest is picked.

Because of the ternary expression is densely packed using those variables, it makes it more scannable compared to something like:


Code

$last_unix_slash_pos=strrpos($FILE_BASE,'/');
if ($last_unix_slash_pos===false) $last_unix_slash_pos=0;
$last_windows_slash_pos=strrpos($FILE_BASE,'\\');
if ($last_windows_slash_pos===false) $last_windows_slash_pos=0;
$FILE_BASE=substr($FILE_BASE,0,($last_unix_slash_pos>$last_windows_slash_pos)?$last_unix_slash_pos:$last_windows_slash_pos);


I just find the second harder to read because the longer variable names obscure the ternary expression.


I know that's shaky ground, I think this is a close thing. I know I always say that mathematicians never apply the same kind of rigour programmers do in their token naming, and that is one of the things that makes maths so hard, so I can actually see your point. But I do thing the code is okay.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#71672
Avatar

Fan in action

I'd like to weigh in here. I am preparing to set up a new community site and am having a heck of a time deciding whether to use ocPortal or not. Here are my two biggest issues. They've both been discussed here, and I may have a new wrinkle to add to the discussion.

I post this because I would love to hear Chris offer his always-thoughtful commentary, and hopefully that will help me make the decision. I'd love to hear what others say as well.

1. Graphics. Having limitations on theming is a handicap to some extent. It's OK once you have your community running: at that point functionality trumps looks every time. And it's clear that ocPortal trumps everybody else in out-of-the-box functionality.

But I have to build my community before it exists. And inviting prospective members to a site that looks like it was designed years ago makes it more difficult for me to fully generate the excitement that will convince them to join and participate. So there's more of a hurdle in just getting the community off the ground, and that's a very important hurdle to minimize.

2. While ocPortal is "open source" in the sense of making its code available for the user to do as they wish, it is not open source in the deeper sense of the term. My impression is that there is no developer community to speak of. There are one or two guys who are the main - if not sole - developers.

What happens if something takes them out of the loop? Maybe it's a health issue, maybe a job opportunity or a shift in company direction. It seems that if I invest my time in developing my community on a platform that has a thriving community of developers, that platform is pretty much guaranteed to continue and to improve over time. I don't get that sense of assurance here.

***
I just want to affirm that I am impressed as heck with the functionality of the platform, and with Chris G both as a mensch and developer, but these two points make it hard for me to commit. If I had money behind me, I'd feel more confident that I could take what's here and run with it if I needed to.

But I'm a bootstrapping entrepreneur, so I've got to make do with what's "good enough" to get the job done, while minimizing risks and expense in the long run. At the moment, the graphics issue makes it tough to consider ocP good enough to get the job done in building my community from scratch, and the lack of developer community raises concerns for long-run security of the platform.

***
Edit: I meant to also comment that if these are big enough hurdles for someone, it's likely they'll just go use one of the alternatives rather than stick around here and talk about it. So I wanted to put in my two cents without just vanishing.

Also, I haven't read anyone else addressing these specific issues, but I certainly haven't read everything on the forums. If there are other posts that cover this, please point me in the right direction.

Thanks!
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Expand