316 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+2 more
SyamilMJ says
Norcross ?@norcross @justintadlock love the complaint that it flags base_64 encoding, while in the same sentence mentioning the “spirit of open source”
Justin Tadlock ?@justintadlock @norcross I wasn’t even going to touch that one and just let it stand on its own.
Pippinsplugins ?@pippinsplugins @justintadlock @norcross yeah, that made me chuckle a bit :P

Source

Let’s touch on that.

In what way does base64 encoding contradicts the philosophy of open source, as long as it wasn’t used to conceal source codes?

Here’s what the manual says:

This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies.

I can understand that WordPress in the past has had plenty bad experience with authors abusing the base64 encoding that they had to permanently ban it, but commercial themes should not be bound by this restrictive rule.

I could possibly write a few dozen lines of code to export/import XML document to transfer data, but there is no immediate advantage to that if I was just trying to transfer a single array of data. On top of that, it just makes things more complicated for the users for something that’s supposed to be a really menial task.

Now please don’t go back taking cheap shots on twitter, if you have a better alternative then I’d like to hear it here.

3 posts
  • Has been part of the Envato Community for over 2 years
nathanrice says
if you have a better alternative then I’d like to hear it here.

Better than base64 encoding? For exporting an array of data? Seriously?

PHP serialization. JSON Encoding

Either one of these works perfectly well. I prefer JSON , myself. Easy, turns an array into a JSON string that can be spit out to a .json file, the data is EASILY read by the json_decode() function … straight back into an array.

2 posts
  • Has been part of the Envato Community for over 2 years
norcross says
if you have a better alternative then I’d like to hear it here.

I have to second what @NathanRice said. either PHP serialization or JSON encoding would work better (most likely faster), and wouldn’t include any question about what’s behind the base64. Because that’s the problem with it: without running it through a decoder, a user doesn’t KNOW what is behind that code. It could be a simple data transport (which is an odd way to handle it, but not ‘malicious’) but it could be any of the other things people use base64 for, most of which is spammy at best and malicious at worst.

also, you’re referring to a plugin that is meant for themes going into the WP repository, which as you are aware doesn’t allow base64. so calling it ‘dumb’ because it does what it is intended to do does indeed make you look stupid.

as for commercial themes, the most popular frameworks out there don’t use it either. if Genesis, Thesis, Headway, and countless others don’t have to use it, I can’t imagine why you would.

316 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+2 more
SyamilMJ says

Serialize data doesn’t work very well if you’re trying to output the data along with HTML content, then import data from a form field.

Outputting into JSON file still require file writing, it’s no simpler than XML export/import.

I’m not trying encourage people to use base64 here, it’s just that in some cases it offers a simpler, easier solution without introducing any harm to the users.

316 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+2 more
SyamilMJ says

so calling it ‘dumb’ because it does what it is intended to do does indeed make you look stupid.

What’s stupid is the fact that I never said such thing and you’re putting those words into my mouth so you can make me look stupid.

What I did say is that theme check is dumb – of course it opens to many different interpretations, depending on how stupid you want to assume people are. Unless you can prove to me that theme check plugin can substitute human assessment, which was my point exactly, then feel free to make more stupid remarks about how stupid other people look to you.

2 posts
  • Has been part of the Envato Community for over 2 years
norcross says
Unless you can prove to me that theme check plugin can substitute human assessment

and a user can asset what base64 code is doing, or even what it means?

Serialize data doesn’t work very well if you’re trying to output the data along with HTML content, then import data from a form field.

I’m struggling to see where this would actually happen but since you’ve brought it up as an argument than I’ll take you on your word that it is a possibility.

I’m not trying encourage people to use base64 here, it’s just that in some cases it offers a simpler, easier solution without introducing any harm to the users.

There’s the issue: it’s simpler and easier, not better. there’s a whole lot of ways I can do things that aren’t the best way. most of them are easier. but for someone who is making a commercial product of all things, the easier way isn’t how things should be done. You want to know why a lot of people in the WP community have a low opinion of ThemeForest? It’s statements like that. saying you’d rather do something that raises suspicion amongst other developers because it’s easier is basically saying “I don’t care about the platform I’m developing on to try a little harder”.

3 posts
  • Has been part of the Envato Community for over 2 years
nathanrice says

Outputting into JSON file still require file writing, it’s no simpler than XML export/import.

And that’s less preferable how? The “copy and paste this seemingly random code from one site to another” is extremely inflexible, from the user’s perspective. Generating an export file is better for the user in almost every single way.

But yes … it is harder for you. So there’s that.

Coming from someone who has built a theme that gets used on millions of sites (yep), your customers will appreciate you putting their experience first, rather than selling them a product that was easiest for you to build.

316 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+2 more
SyamilMJ says

I meant it was simpler for the end user, not myself. I don’t have million of sites to brag about, but i can assure to you that I’m not the kind of person who take shortcuts to get my work done. You can have a look at my work on Github for proof.

Copy-paste is simply easier than click-download-find file on desktop-upload-click and that didn’t even count if there were any seemingly similar named files lying on their desktops. It’s just a chunk options data, why all the fuss? In terms of usability, it just looked to be the better, simpler option for the users.

316 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
+2 more
SyamilMJ says

Unless you can prove to me that theme check plugin can substitute human assessment

and a user can asset what base64 code is doing, or even what it means?

Serialize data doesn’t work very well if you’re trying to output the data along with HTML content, then import data from a form field.

I’m struggling to see where this would actually happen but since you’ve brought it up as an argument than I’ll take you on your word that it is a possibility.

I’m not trying encourage people to use base64 here, it’s just that in some cases it offers a simpler, easier solution without introducing any harm to the users.
There’s the issue: it’s simpler and easier, not better. there’s a whole lot of ways I can do things that aren’t the best way. most of them are easier. but for someone who is making a commercial product of all things, the easier way isn’t how things should be done. You want to know why a lot of people in the WP community have a low opinion of ThemeForest? It’s statements like that. saying you’d rather do something that raises suspicion amongst other developers because it’s easier is basically saying “I don’t care about the platform I’m developing on to try a little harder”.

There you go again trying to put words into my mouth. Could you please do not mix your own perception to use as an argument?

Low opinion? Oh please, that’s very entertaining. First of all, the reason why you’re here is not really because you have any concern for the WordPress community, or Themeforest, or anyone else at all if that matters. You are the kind of person who’d have low opinion on everyone, because you just assume everyone is stupid.

If you really want to help make the community then do what justin did, get involved in the forum to educate people, sell plugins/themes that have better standard, and stop making smirky remarks on other people you don’t agree with on twitter.

815 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Contributed a free file of the month
+3 more
rvision_ says

Intereseting how suddenly some users appear only to comment on this thread :)

I think the fear of base64 encoding comes from users with no OOP backgrounds. They still live in an ‘array’ world. Regarding JSON – can JSON serialize a php class? Or am I wrong here?

@SyamilMJ: agree with you 100%

by
by
by
by
by
by